@acorex-platform/module-calendar-management-client 0.0.30 → 0.0.33

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 (24) hide show
  1. package/fesm2022/acorex-platform-module-calendar-management-client-contracts-entities-calendar-occasion-type.mjs +211 -0
  2. package/fesm2022/acorex-platform-module-calendar-management-client-contracts-entities-calendar-occasion-type.mjs.map +1 -0
  3. package/fesm2022/acorex-platform-module-calendar-management-client-contracts-entities-calendar-occasion.mjs +398 -0
  4. package/fesm2022/acorex-platform-module-calendar-management-client-contracts-entities-calendar-occasion.mjs.map +1 -0
  5. package/fesm2022/acorex-platform-module-calendar-management-client-contracts-entities-calendar.mjs +247 -0
  6. package/fesm2022/acorex-platform-module-calendar-management-client-contracts-entities-calendar.mjs.map +1 -0
  7. package/fesm2022/acorex-platform-module-calendar-management-client-contracts-entity-catalog-acorex-platform-module-calendar-management-client-contracts-entity-catalog-DPE64x5s.mjs +57 -0
  8. package/fesm2022/acorex-platform-module-calendar-management-client-contracts-entity-catalog-acorex-platform-module-calendar-management-client-contracts-entity-catalog-DPE64x5s.mjs.map +1 -0
  9. package/fesm2022/acorex-platform-module-calendar-management-client-contracts-entity-catalog-calendar-occasion-type.entity-DH1uBu2s.mjs +175 -0
  10. package/fesm2022/acorex-platform-module-calendar-management-client-contracts-entity-catalog-calendar-occasion-type.entity-DH1uBu2s.mjs.map +1 -0
  11. package/fesm2022/acorex-platform-module-calendar-management-client-contracts-entity-catalog-calendar-occasion.entity-CIP3-0Wp.mjs +362 -0
  12. package/fesm2022/acorex-platform-module-calendar-management-client-contracts-entity-catalog-calendar-occasion.entity-CIP3-0Wp.mjs.map +1 -0
  13. package/fesm2022/acorex-platform-module-calendar-management-client-contracts-entity-catalog-calendar.entity-BffoExvv.mjs +211 -0
  14. package/fesm2022/acorex-platform-module-calendar-management-client-contracts-entity-catalog-calendar.entity-BffoExvv.mjs.map +1 -0
  15. package/fesm2022/acorex-platform-module-calendar-management-client-contracts-entity-catalog.mjs +2 -0
  16. package/fesm2022/acorex-platform-module-calendar-management-client-contracts-entity-catalog.mjs.map +1 -0
  17. package/fesm2022/acorex-platform-module-calendar-management-client-local-entities.mjs +31 -0
  18. package/fesm2022/acorex-platform-module-calendar-management-client-local-entities.mjs.map +1 -0
  19. package/package.json +21 -1
  20. package/types/acorex-platform-module-calendar-management-client-contracts-entities-calendar-occasion-type.d.ts +5 -0
  21. package/types/acorex-platform-module-calendar-management-client-contracts-entities-calendar-occasion.d.ts +5 -0
  22. package/types/acorex-platform-module-calendar-management-client-contracts-entities-calendar.d.ts +5 -0
  23. package/types/acorex-platform-module-calendar-management-client-contracts-entity-catalog.d.ts +10 -0
  24. package/types/acorex-platform-module-calendar-management-client-local-entities.d.ts +12 -0
@@ -0,0 +1,211 @@
1
+ import { AXPWidgetsCatalog } from '@acorex-platform/framework-shared/core';
2
+ import { createAllQueryView, entityMasterCrudActions, entityMasterRecordActions } from '@acorex-platform/framework-shared/entity';
3
+
4
+ const config = {
5
+ i18n: 'calendar-management',
6
+ module: 'CalendarManagement'
7
+ };
8
+ const RootConfig = {
9
+ config,
10
+ module: {
11
+ name: config.module,
12
+ title: `@${config.i18n}:module.title`,
13
+ icon: 'fa-light fa-calendar',
14
+ },
15
+ entities: {
16
+ calendar: {
17
+ name: 'Calendar',
18
+ title: `@${config.i18n}:calendars.entities.calendar.title`,
19
+ titlePlural: `@${config.i18n}:calendars.entities.calendar.plural`,
20
+ icon: 'fa-light fa-calendar',
21
+ },
22
+ calendarOccasion: {
23
+ name: 'CalendarOccasion',
24
+ title: `@${config.i18n}:calendar-occasions.entities.calendar-occasion.title`,
25
+ titlePlural: `@${config.i18n}:calendar-occasions.entities.calendar-occasion.plural`,
26
+ icon: 'fa-light fa-calendar-day',
27
+ },
28
+ calendarOccasionType: {
29
+ name: 'CalendarOccasionType',
30
+ title: `@${config.i18n}:calendar-occasion-types.entities.calendar-occasion-type.title`,
31
+ titlePlural: `@${config.i18n}:calendar-occasion-types.entities.calendar-occasion-type.plural`,
32
+ icon: 'fa-light fa-tag',
33
+ },
34
+ },
35
+ };
36
+
37
+ async function calendarOccasionTypeFactory() {
38
+ const i18n = RootConfig.config.i18n;
39
+ const entityDef = {
40
+ module: RootConfig.module.name,
41
+ name: RootConfig.entities.calendarOccasionType.name,
42
+ title: RootConfig.entities.calendarOccasionType.title,
43
+ icon: RootConfig.entities.calendarOccasionType.icon,
44
+ formats: {
45
+ individual: RootConfig.entities.calendarOccasionType.title,
46
+ plural: RootConfig.entities.calendarOccasionType.titlePlural,
47
+ searchResult: {
48
+ title: '{{ title }}',
49
+ description: '{{ description }}',
50
+ },
51
+ },
52
+ plugins: [
53
+ { name: 'history' },
54
+ { name: 'lock' },
55
+ { name: 'compare' },
56
+ { name: 'color' },
57
+ { name: 'icon' },
58
+ { name: 'archive' },
59
+ ],
60
+ //#region ---- Property Groups ----
61
+ groups: [
62
+ {
63
+ id: 'basic-info',
64
+ title: '@general:terms.interface.basic-info',
65
+ },
66
+ {
67
+ id: 'appearance',
68
+ title: '@general:terms.interface.appearance',
69
+ },
70
+ ],
71
+ //#endregion
72
+ //#region ---- Properties ----
73
+ properties: [
74
+ {
75
+ name: 'title',
76
+ title: '@general:terms.common.title',
77
+ groupId: 'basic-info',
78
+ options: {
79
+ sort: { enabled: true },
80
+ filter: {
81
+ advance: { enabled: true },
82
+ inline: { enabled: true },
83
+ },
84
+ },
85
+ schema: {
86
+ dataType: 'string',
87
+ interface: {
88
+ type: AXPWidgetsCatalog.text,
89
+ options: {
90
+ multiLanguage: true,
91
+ placeholder: 'Enter occasion type title',
92
+ },
93
+ },
94
+ },
95
+ validations: [
96
+ { rule: 'required' },
97
+ ],
98
+ },
99
+ {
100
+ name: 'description',
101
+ title: '@general:terms.common.description',
102
+ groupId: 'basic-info',
103
+ options: {
104
+ sort: { enabled: false },
105
+ filter: {
106
+ advance: { enabled: true },
107
+ inline: { enabled: false },
108
+ },
109
+ },
110
+ schema: {
111
+ dataType: 'string',
112
+ interface: {
113
+ type: AXPWidgetsCatalog.largeText,
114
+ options: {
115
+ rows: 3,
116
+ multiLanguage: true,
117
+ placeholder: 'Enter occasion type description',
118
+ },
119
+ },
120
+ },
121
+ },
122
+ {
123
+ name: 'isPublicHoliday',
124
+ title: '@calendar-management:calendar-occasion-types.entities.calendar-occasion-type.fields.is-public-holiday.title',
125
+ groupId: 'basic-info',
126
+ options: {
127
+ sort: { enabled: true },
128
+ filter: {
129
+ advance: { enabled: true },
130
+ inline: { enabled: true },
131
+ },
132
+ },
133
+ schema: {
134
+ dataType: 'boolean',
135
+ defaultValue: false,
136
+ interface: {
137
+ type: AXPWidgetsCatalog.toggle,
138
+ },
139
+ },
140
+ },
141
+ ],
142
+ //#endregion
143
+ //#region ---- Table Columns ----
144
+ columns: [
145
+ { name: 'title' },
146
+ { name: 'isPublicHoliday' },
147
+ ],
148
+ //#endregion
149
+ //#region ---- Interface Layouts ----
150
+ interfaces: {
151
+ master: {
152
+ create: {
153
+ sections: [
154
+ { id: 'basic-info' },
155
+ { id: 'appearance' },
156
+ ],
157
+ properties: [
158
+ { name: 'title', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
159
+ { name: 'description', layout: { positions: { lg: { colSpan: 12, order: 2 } } } },
160
+ { name: 'isPublicHoliday', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },
161
+ ],
162
+ },
163
+ update: {
164
+ sections: [
165
+ { id: 'basic-info' },
166
+ { id: 'appearance' },
167
+ ],
168
+ properties: [
169
+ { name: 'title', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
170
+ { name: 'description', layout: { positions: { lg: { colSpan: 12, order: 2 } } } },
171
+ { name: 'isPublicHoliday', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },
172
+ ],
173
+ },
174
+ single: {
175
+ title: '{{title}}',
176
+ sections: [
177
+ { id: 'basic-info' },
178
+ { id: 'appearance' },
179
+ ],
180
+ properties: [
181
+ { name: 'title', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
182
+ { name: 'description', layout: { positions: { lg: { colSpan: 12, order: 2 } } } },
183
+ { name: 'isPublicHoliday', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },
184
+ ],
185
+ actions: [
186
+ ...entityMasterRecordActions()
187
+ ],
188
+ },
189
+ list: {
190
+ actions: [
191
+ ...entityMasterCrudActions(),
192
+ ],
193
+ views: [
194
+ createAllQueryView({
195
+ sorts: [{ name: 'title', dir: 'asc' }]
196
+ }),
197
+ ],
198
+ },
199
+ },
200
+ },
201
+ //#endregion
202
+ };
203
+ return entityDef;
204
+ }
205
+
206
+ /**
207
+ * Generated bundle index. Do not edit.
208
+ */
209
+
210
+ export { calendarOccasionTypeFactory };
211
+ //# sourceMappingURL=acorex-platform-module-calendar-management-client-contracts-entities-calendar-occasion-type.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-calendar-management-client-contracts-entities-calendar-occasion-type.mjs","sources":["../../../../libs/modules/calendar-management/contracts/src/root-config.ts","../../../../libs/modules/calendar-management/contracts/src/entities/calendar-occasion-type/calendar-occasion-type.entity.ts","../../../../libs/modules/calendar-management/contracts/src/acorex-platform-module-calendar-management-client-contracts-entities-calendar-occasion-type.ts"],"sourcesContent":["const config = {\n i18n: 'calendar-management',\n module: 'CalendarManagement'\n};\n\nexport const RootConfig = {\n config,\n module: {\n name: config.module,\n title: `@${config.i18n}:module.title`,\n icon: 'fa-light fa-calendar',\n },\n entities: {\n calendar: {\n name: 'Calendar',\n title: `@${config.i18n}:calendars.entities.calendar.title`,\n titlePlural: `@${config.i18n}:calendars.entities.calendar.plural`,\n icon: 'fa-light fa-calendar',\n },\n calendarOccasion: {\n name: 'CalendarOccasion',\n title: `@${config.i18n}:calendar-occasions.entities.calendar-occasion.title`,\n titlePlural: `@${config.i18n}:calendar-occasions.entities.calendar-occasion.plural`,\n icon: 'fa-light fa-calendar-day',\n },\n calendarOccasionType: {\n name: 'CalendarOccasionType',\n title: `@${config.i18n}:calendar-occasion-types.entities.calendar-occasion-type.title`,\n titlePlural: `@${config.i18n}:calendar-occasion-types.entities.calendar-occasion-type.plural`,\n icon: 'fa-light fa-tag',\n },\n },\n} as const;\n","import { AXPWidgetsCatalog } from '@acorex-platform/framework-shared/core';\nimport { AXPEntity, createAllQueryView, entityMasterCrudActions, entityMasterRecordActions } from '@acorex-platform/framework-shared/entity';\nimport { RootConfig } from '../../root-config';\n\nexport async function calendarOccasionTypeFactory(): Promise<AXPEntity | null> {\n const i18n = RootConfig.config.i18n;\n\n const entityDef: AXPEntity = {\n module: RootConfig.module.name,\n name: RootConfig.entities.calendarOccasionType.name,\n title: RootConfig.entities.calendarOccasionType.title,\n icon: RootConfig.entities.calendarOccasionType.icon,\n formats: {\n individual: RootConfig.entities.calendarOccasionType.title,\n plural: RootConfig.entities.calendarOccasionType.titlePlural,\n searchResult: {\n title: '{{ title }}',\n description: '{{ description }}',\n },\n },\n plugins: [\n { name: 'history' },\n { name: 'lock' },\n { name: 'compare' },\n { name: 'color' },\n { name: 'icon' },\n { name: 'archive' },\n ],\n\n //#region ---- Property Groups ----\n\n groups: [\n {\n id: 'basic-info',\n title: '@general:terms.interface.basic-info',\n },\n {\n id: 'appearance',\n title: '@general:terms.interface.appearance',\n },\n ],\n\n //#endregion\n\n //#region ---- Properties ----\n\n properties: [\n {\n name: 'title',\n title: '@general:terms.common.title',\n groupId: 'basic-info',\n options: {\n sort: { enabled: true },\n filter: {\n advance: { enabled: true },\n inline: { enabled: true },\n },\n },\n schema: {\n dataType: 'string',\n interface: {\n type: AXPWidgetsCatalog.text,\n options: {\n multiLanguage: true,\n placeholder: 'Enter occasion type title',\n },\n },\n },\n validations: [\n { rule: 'required' },\n ],\n },\n {\n name: 'description',\n title: '@general:terms.common.description',\n groupId: 'basic-info',\n options: {\n sort: { enabled: false },\n filter: {\n advance: { enabled: true },\n inline: { enabled: false },\n },\n },\n schema: {\n dataType: 'string',\n interface: {\n type: AXPWidgetsCatalog.largeText,\n options: {\n rows: 3,\n multiLanguage: true,\n placeholder: 'Enter occasion type description',\n },\n },\n },\n },\n {\n name: 'isPublicHoliday',\n title: '@calendar-management:calendar-occasion-types.entities.calendar-occasion-type.fields.is-public-holiday.title',\n groupId: 'basic-info',\n options: {\n sort: { enabled: true },\n filter: {\n advance: { enabled: true },\n inline: { enabled: true },\n },\n },\n schema: {\n dataType: 'boolean',\n defaultValue: false,\n interface: {\n type: AXPWidgetsCatalog.toggle,\n },\n },\n },\n ],\n\n //#endregion\n\n //#region ---- Table Columns ----\n\n columns: [\n { name: 'title' },\n { name: 'isPublicHoliday' },\n ],\n\n //#endregion\n\n //#region ---- Interface Layouts ----\n\n interfaces: {\n master: {\n create: {\n sections: [\n { id: 'basic-info' },\n { id: 'appearance' },\n ],\n properties: [\n { name: 'title', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },\n { name: 'description', layout: { positions: { lg: { colSpan: 12, order: 2 } } } },\n { name: 'isPublicHoliday', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },\n ],\n },\n update: {\n sections: [\n { id: 'basic-info' },\n { id: 'appearance' },\n ],\n properties: [\n { name: 'title', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },\n { name: 'description', layout: { positions: { lg: { colSpan: 12, order: 2 } } } },\n { name: 'isPublicHoliday', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },\n ],\n },\n single: {\n title: '{{title}}',\n sections: [\n { id: 'basic-info' },\n { id: 'appearance' },\n ],\n properties: [\n { name: 'title', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },\n { name: 'description', layout: { positions: { lg: { colSpan: 12, order: 2 } } } },\n { name: 'isPublicHoliday', layout: { positions: { lg: { colSpan: 6, order: 3 } } } },\n ],\n actions: [\n ...entityMasterRecordActions()\n ],\n },\n list: {\n actions: [\n ...entityMasterCrudActions(),\n ],\n views: [\n createAllQueryView({\n sorts: [{ name: 'title', dir: 'asc' }]\n }),\n ],\n },\n },\n },\n\n //#endregion\n };\n\n return entityDef;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,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE;wBACjF,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE;AACrF,qBAAA;AACD,oBAAA,OAAO,EAAE;AACP,wBAAA,GAAG,yBAAyB;AAC7B,qBAAA;AACF,iBAAA;AACD,gBAAA,IAAI,EAAE;AACJ,oBAAA,OAAO,EAAE;AACP,wBAAA,GAAG,uBAAuB,EAAE;AAC7B,qBAAA;AACD,oBAAA,KAAK,EAAE;AACL,wBAAA,kBAAkB,CAAC;4BACjB,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE;yBACtC,CAAC;AACH,qBAAA;AACF,iBAAA;AACF,aAAA;AACF,SAAA;;KAGF;AAED,IAAA,OAAO,SAAS;AAClB;;ACzLA;;AAEG;;;;"}
@@ -0,0 +1,398 @@
1
+ import { AXPWidgetsCatalog } from '@acorex-platform/framework-shared/core';
2
+ import { createAllQueryView, entityMasterCrudActions, AXPEntityCommandScope } from '@acorex-platform/framework-shared/entity';
3
+
4
+ const config = {
5
+ i18n: 'calendar-management',
6
+ module: 'CalendarManagement'
7
+ };
8
+ const RootConfig = {
9
+ config,
10
+ module: {
11
+ name: config.module,
12
+ title: `@${config.i18n}:module.title`,
13
+ icon: 'fa-light fa-calendar',
14
+ },
15
+ entities: {
16
+ calendar: {
17
+ name: 'Calendar',
18
+ title: `@${config.i18n}:calendars.entities.calendar.title`,
19
+ titlePlural: `@${config.i18n}:calendars.entities.calendar.plural`,
20
+ icon: 'fa-light fa-calendar',
21
+ },
22
+ calendarOccasion: {
23
+ name: 'CalendarOccasion',
24
+ title: `@${config.i18n}:calendar-occasions.entities.calendar-occasion.title`,
25
+ titlePlural: `@${config.i18n}:calendar-occasions.entities.calendar-occasion.plural`,
26
+ icon: 'fa-light fa-calendar-day',
27
+ },
28
+ calendarOccasionType: {
29
+ name: 'CalendarOccasionType',
30
+ title: `@${config.i18n}:calendar-occasion-types.entities.calendar-occasion-type.title`,
31
+ titlePlural: `@${config.i18n}:calendar-occasion-types.entities.calendar-occasion-type.plural`,
32
+ icon: 'fa-light fa-tag',
33
+ },
34
+ },
35
+ };
36
+
37
+ async function calendarOccasionFactory() {
38
+ const i18n = RootConfig.config.i18n;
39
+ const entityDef = {
40
+ module: RootConfig.module.name,
41
+ name: RootConfig.entities.calendarOccasion.name,
42
+ title: RootConfig.entities.calendarOccasion.title,
43
+ icon: RootConfig.entities.calendarOccasion.icon,
44
+ formats: {
45
+ individual: RootConfig.entities.calendarOccasion.title,
46
+ plural: RootConfig.entities.calendarOccasion.titlePlural,
47
+ searchResult: {
48
+ title: '{{ context.eval("title", { pipes: ["translate"] }) + " - " + context.eval("date", { pipes: ["date"] }) }}',
49
+ description: '{{ context.eval("calendar.title", { pipes: ["translate"] }) + " - " + context.eval("type") }}',
50
+ },
51
+ },
52
+ //#region ---- Property Groups ----
53
+ groups: [
54
+ {
55
+ id: 'basic-info',
56
+ title: '@general:terms.interface.basic-info',
57
+ },
58
+ {
59
+ id: 'date',
60
+ title: '@general:terms.datetime.date',
61
+ },
62
+ {
63
+ id: 'appearance',
64
+ title: '@general:terms.interface.appearance',
65
+ },
66
+ {
67
+ id: 'settings',
68
+ title: '@general:terms.interface.settings',
69
+ },
70
+ ],
71
+ //#endregion
72
+ //#region ---- Properties ----
73
+ properties: [
74
+ {
75
+ name: 'calendarId',
76
+ title: '@calendar-management:calendar-occasions.entities.calendar-occasion.fields.calendar.title',
77
+ groupId: 'basic-info',
78
+ options: {
79
+ sort: { enabled: true },
80
+ filter: {
81
+ advance: { enabled: true },
82
+ inline: { enabled: true },
83
+ },
84
+ },
85
+ schema: {
86
+ dataType: 'string',
87
+ interface: {
88
+ type: AXPWidgetsCatalog.lookup,
89
+ options: {
90
+ entity: `${RootConfig.module.name}.${RootConfig.entities.calendar.name}`,
91
+ valueField: 'id',
92
+ textField: 'title',
93
+ expose: [
94
+ { source: 'id', target: 'calendar.id' },
95
+ { source: 'title', target: 'calendar.title' },
96
+ ],
97
+ },
98
+ },
99
+ },
100
+ validations: [
101
+ { rule: 'required' },
102
+ ],
103
+ },
104
+ {
105
+ name: 'title',
106
+ title: '@general:terms.common.title',
107
+ groupId: 'basic-info',
108
+ options: {
109
+ sort: { enabled: true },
110
+ filter: {
111
+ advance: { enabled: true },
112
+ inline: { enabled: true },
113
+ },
114
+ },
115
+ schema: {
116
+ dataType: 'string',
117
+ interface: {
118
+ type: AXPWidgetsCatalog.text,
119
+ options: {
120
+ multiLanguage: true,
121
+ placeholder: 'Enter occasion title',
122
+ },
123
+ },
124
+ },
125
+ validations: [
126
+ { rule: 'required' },
127
+ ],
128
+ },
129
+ {
130
+ name: 'description',
131
+ title: '@general:terms.common.description',
132
+ groupId: 'basic-info',
133
+ options: {
134
+ sort: { enabled: false },
135
+ filter: {
136
+ advance: { enabled: true },
137
+ inline: { enabled: false },
138
+ },
139
+ },
140
+ schema: {
141
+ dataType: 'string',
142
+ interface: {
143
+ type: AXPWidgetsCatalog.largeText,
144
+ options: {
145
+ rows: 3,
146
+ multiLanguage: true,
147
+ placeholder: 'Enter occasion description',
148
+ },
149
+ },
150
+ },
151
+ },
152
+ {
153
+ name: 'typeId',
154
+ title: '@calendar-management:calendar-occasions.entities.calendar-occasion.fields.type.title',
155
+ groupId: 'basic-info',
156
+ options: {
157
+ sort: { enabled: true },
158
+ filter: {
159
+ advance: { enabled: true },
160
+ inline: { enabled: true },
161
+ },
162
+ },
163
+ schema: {
164
+ dataType: 'string',
165
+ interface: {
166
+ type: AXPWidgetsCatalog.lookup,
167
+ options: {
168
+ look: 'select',
169
+ entity: `${RootConfig.module.name}.${RootConfig.entities.calendarOccasionType.name}`,
170
+ valueField: 'id',
171
+ textField: 'title',
172
+ expose: [
173
+ { source: 'id', target: 'type.id' },
174
+ { source: 'title', target: 'type.title' },
175
+ { source: 'color', target: 'type.color' },
176
+ { source: 'icon', target: 'type.icon' },
177
+ { source: 'isPublicHoliday', target: 'type.isPublicHoliday' },
178
+ ],
179
+ },
180
+ },
181
+ },
182
+ validations: [
183
+ { rule: 'required' },
184
+ ],
185
+ },
186
+ {
187
+ name: 'date',
188
+ title: '@general:terms.datetime.date',
189
+ groupId: 'date',
190
+ options: {
191
+ sort: { enabled: true },
192
+ filter: {
193
+ advance: { enabled: true },
194
+ inline: { enabled: true },
195
+ },
196
+ },
197
+ schema: {
198
+ dataType: 'date',
199
+ interface: {
200
+ type: AXPWidgetsCatalog.dateTime,
201
+ options: {
202
+ showTime: false,
203
+ },
204
+ },
205
+ },
206
+ validations: [
207
+ { rule: 'required' },
208
+ ],
209
+ },
210
+ {
211
+ name: 'isRecurring',
212
+ title: '@calendar-management:calendar-occasions.entities.calendar-occasion.fields.is-recurring.title',
213
+ groupId: 'date',
214
+ options: {
215
+ sort: { enabled: true },
216
+ filter: {
217
+ advance: { enabled: true },
218
+ inline: { enabled: true },
219
+ },
220
+ },
221
+ schema: {
222
+ dataType: 'boolean',
223
+ defaultValue: false,
224
+ interface: {
225
+ type: AXPWidgetsCatalog.toggle,
226
+ },
227
+ },
228
+ },
229
+ {
230
+ name: 'recurrenceRule',
231
+ title: '@calendar-management:calendar-occasions.entities.calendar-occasion.fields.recurrence-rule.title',
232
+ groupId: 'date',
233
+ options: {
234
+ sort: { enabled: false },
235
+ filter: {
236
+ advance: { enabled: true },
237
+ inline: { enabled: false },
238
+ },
239
+ },
240
+ schema: {
241
+ dataType: 'string',
242
+ visible: '{{ !!context.eval("isRecurring") }}',
243
+ interface: {
244
+ type: AXPWidgetsCatalog.largeText,
245
+ options: {
246
+ rows: 3,
247
+ placeholder: 'FREQ=YEARLY',
248
+ },
249
+ },
250
+ },
251
+ },
252
+ {
253
+ name: 'isPublicHoliday',
254
+ title: '@calendar-management:calendar-occasions.entities.calendar-occasion.fields.is-public-holiday.title',
255
+ groupId: 'settings',
256
+ options: {
257
+ sort: { enabled: true },
258
+ filter: {
259
+ advance: { enabled: true },
260
+ inline: { enabled: true },
261
+ },
262
+ },
263
+ schema: {
264
+ dataType: 'boolean',
265
+ defaultValue: '{{ context.eval("type.isPublicHoliday") || false }}',
266
+ interface: {
267
+ type: AXPWidgetsCatalog.toggle,
268
+ },
269
+ },
270
+ },
271
+ {
272
+ name: 'order',
273
+ title: '@general:terms.classification.order',
274
+ groupId: 'settings',
275
+ options: {
276
+ sort: { enabled: true },
277
+ filter: {
278
+ advance: { enabled: true },
279
+ inline: { enabled: false },
280
+ },
281
+ },
282
+ schema: {
283
+ dataType: 'number',
284
+ interface: {
285
+ type: AXPWidgetsCatalog.number,
286
+ options: {
287
+ minValue: 0,
288
+ maxValue: 9999,
289
+ },
290
+ },
291
+ },
292
+ },
293
+ ],
294
+ //#endregion
295
+ //#region ---- Table Columns ----
296
+ columns: [
297
+ { name: 'title' },
298
+ { name: 'description' },
299
+ { name: 'typeId' },
300
+ { name: 'date' },
301
+ { name: 'isRecurring' },
302
+ { name: 'isPublicHoliday' },
303
+ ],
304
+ //#endregion
305
+ //#region ---- Interface Layouts ----
306
+ interfaces: {
307
+ master: {
308
+ create: {
309
+ sections: [
310
+ { id: 'basic-info' },
311
+ { id: 'date' },
312
+ { id: 'settings' },
313
+ ],
314
+ properties: [
315
+ { name: 'title', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
316
+ { name: 'typeId', layout: { positions: { lg: { colSpan: 6, order: 2 } } } },
317
+ { name: 'description', layout: { positions: { lg: { colSpan: 12, order: 4 } } } },
318
+ { name: 'date', layout: { positions: { lg: { colSpan: 6, order: 5 } } } },
319
+ { name: 'isRecurring', layout: { positions: { lg: { colSpan: 6, order: 9 } } } },
320
+ { name: 'recurrenceRule', layout: { positions: { lg: { colSpan: 12, order: 10 } } } },
321
+ { name: 'isPublicHoliday', layout: { positions: { lg: { colSpan: 6, order: 11 } } } },
322
+ { name: 'order', layout: { positions: { lg: { colSpan: 6, order: 13 } } } },
323
+ ],
324
+ },
325
+ update: {
326
+ sections: [
327
+ { id: 'basic-info' },
328
+ { id: 'date' },
329
+ { id: 'settings' },
330
+ ],
331
+ properties: [
332
+ { name: 'title', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
333
+ { name: 'typeId', layout: { positions: { lg: { colSpan: 6, order: 2 } } } },
334
+ { name: 'description', layout: { positions: { lg: { colSpan: 12, order: 4 } } } },
335
+ { name: 'date', layout: { positions: { lg: { colSpan: 6, order: 5 } } } },
336
+ { name: 'isRecurring', layout: { positions: { lg: { colSpan: 6, order: 9 } } } },
337
+ { name: 'recurrenceRule', layout: { positions: { lg: { colSpan: 12, order: 10 } } } },
338
+ { name: 'isPublicHoliday', layout: { positions: { lg: { colSpan: 6, order: 11 } } } },
339
+ { name: 'order', layout: { positions: { lg: { colSpan: 6, order: 13 } } } },
340
+ ],
341
+ },
342
+ single: {
343
+ title: '{{ context.eval("title", { pipes: ["translate"] }) }}',
344
+ sections: [
345
+ { id: 'basic-info' },
346
+ { id: 'date' },
347
+ { id: 'settings' },
348
+ ],
349
+ properties: [
350
+ { name: 'title', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
351
+ { name: 'typeId', layout: { positions: { lg: { colSpan: 6, order: 2 } } } },
352
+ { name: 'description', layout: { positions: { lg: { colSpan: 12, order: 4 } } } },
353
+ { name: 'date', layout: { positions: { lg: { colSpan: 6, order: 5 } } } },
354
+ { name: 'isRecurring', layout: { positions: { lg: { colSpan: 6, order: 9 } } } },
355
+ { name: 'recurrenceRule', layout: { positions: { lg: { colSpan: 12, order: 10 } } } },
356
+ { name: 'isPublicHoliday', layout: { positions: { lg: { colSpan: 6, order: 11 } } } },
357
+ { name: 'order', layout: { positions: { lg: { colSpan: 6, order: 13 } } } },
358
+ ],
359
+ actions: [
360
+ {
361
+ title: '@general:actions.edit.title',
362
+ command: 'Entity:Edit',
363
+ priority: 'primary',
364
+ type: 'update',
365
+ scope: AXPEntityCommandScope.Individual,
366
+ },
367
+ {
368
+ title: '@general:actions.delete.title',
369
+ command: 'Entity:Remove',
370
+ priority: 'secondary',
371
+ type: 'delete',
372
+ scope: AXPEntityCommandScope.Individual,
373
+ },
374
+ ],
375
+ },
376
+ list: {
377
+ actions: [
378
+ ...entityMasterCrudActions(),
379
+ ],
380
+ views: [
381
+ createAllQueryView({
382
+ sorts: [{ name: 'date', dir: 'asc' }]
383
+ }),
384
+ ],
385
+ },
386
+ },
387
+ },
388
+ //#endregion
389
+ };
390
+ return entityDef;
391
+ }
392
+
393
+ /**
394
+ * Generated bundle index. Do not edit.
395
+ */
396
+
397
+ export { calendarOccasionFactory };
398
+ //# sourceMappingURL=acorex-platform-module-calendar-management-client-contracts-entities-calendar-occasion.mjs.map