@drayman/elements 1.57.0 → 1.59.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drayman/elements",
3
- "version": "1.57.0",
3
+ "version": "1.59.0",
4
4
  "description": "A collection of web components for Drayman.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -12,7 +12,7 @@
12
12
  "build:types": "tsc -p ./tsconfig.types.json",
13
13
  "typedoc": "npm run build:types && typedoc --tsconfig ./tsconfig.types.json",
14
14
  "lint": "ng lint",
15
- "build": "npm run build:calendar && npm run build:code-editor && npm run build:button && npm run build:text-field && npm run build:claviz-charts && npm run build:file-uploader && npm run build:number-field && npm run build:select && npm run build:table && npm run build:checkbox && npm run build:slider && npm run build:textarea-field && npm run build:radio-group && npm run build:datepicker && npm run build:timepicker && npm run build:pdf-viewer && npm run build:ngx-charts && npm run build:menu && npm run build:ngx-graph && npm run build:youtube-player && npm run build:nebula && npm run build:grid && npm run build:gauge && npm run typedoc",
15
+ "build": "npm run build:calendar && npm run build:code-editor && npm run build:button && npm run build:text-field && npm run build:claviz-charts && npm run build:file-uploader && npm run build:number-field && npm run build:select && npm run build:table && npm run build:checkbox && npm run build:slider && npm run build:textarea-field && npm run build:radio-group && npm run build:datepicker && npm run build:timepicker && npm run build:pdf-viewer && npm run build:ngx-charts && npm run build:menu && npm run build:ngx-graph && npm run build:youtube-player && npm run build:nebula && npm run build:grid && npm run build:gauge && npm run build:year-calendar && npm run typedoc",
16
16
  "build:code-editor": "ng build code-editor --extra-webpack-config webpack.partial.js --configuration production --single-bundle --output-hashing=none",
17
17
  "build:calendar": "ng build calendar --configuration production --single-bundle --output-hashing=none",
18
18
  "build:button": "ng build button --configuration production --single-bundle --output-hashing=none",
@@ -36,6 +36,7 @@
36
36
  "build:ngx-charts": "ng build ngx-charts --configuration production --single-bundle --output-hashing=none",
37
37
  "build:ngx-graph": "ng build ngx-graph --configuration production --single-bundle --output-hashing=none",
38
38
  "build:menu": "ng build menu --configuration production --single-bundle --output-hashing=none",
39
+ "build:year-calendar": "ng build year-calendar --configuration production --single-bundle --output-hashing=none",
39
40
  "create-element": "./element-generator/create.sh",
40
41
  "e2e": "ng e2e"
41
42
  },
@@ -53,6 +54,9 @@
53
54
  "drayman-calendar": {
54
55
  "script": "./dist/calendar/main.js"
55
56
  },
57
+ "drayman-year-calendar": {
58
+ "script": "./dist/year-calendar/main.js"
59
+ },
56
60
  "drayman-code-editor": {
57
61
  "script": "./dist/code-editor/main.js"
58
62
  },
@@ -151,6 +155,7 @@
151
155
  "claviz-charts": "0.5.0",
152
156
  "codelyzer": "^6.0.0",
153
157
  "codemirror": "5.65.2",
158
+ "cpx": "^1.5.0",
154
159
  "d3-require": "1.2.4",
155
160
  "date-fns": "2.29.2",
156
161
  "dayjs": "1.9.6",
package/types/index.d.ts CHANGED
@@ -3,6 +3,7 @@ import { DraymanClavizCharts } from '../dist/types/claviz-charts/src/app/models/
3
3
  import { DraymanDatepicker } from '../dist/types/datepicker/src/app/models/datepicker-options';
4
4
  import { DraymanGauge } from '../dist/types/gauge/src/app/models/gauge-options';
5
5
  import { DraymanFileUploader } from '../dist/types/file-uploader/src/app/models/file-uploader-options';
6
+ import { DraymanYearCalendar } from '../dist/types/year-calendar/src/app/models/year-calendar-options';
6
7
  import { DraymanMenu } from '../dist/types/menu/src/app/models/menu-options';
7
8
  import { DraymanNgxCharts } from '../dist/types/ngx-charts/src/app/models/ngx-charts-options';
8
9
  import { DraymanNgxGraph } from '../dist/types/ngx-graph/src/app/models/ngx-graph-options';
@@ -313,6 +314,44 @@ declare global {
313
314
  * ```
314
315
  */
315
316
  interface DraymanSliderProps extends DraymanSlider, DraymanElementsProps { }
317
+ /**
318
+ * # <drayman-year-calendar \/>
319
+ *
320
+ * Year calendar.
321
+ *
322
+ * ## Example of usage
323
+ *
324
+ * ### Year calendar with selected dates.
325
+ * ![](media://drayman-year-calendar.gif)
326
+ *
327
+ * ```typescript
328
+ * export const component: DraymanComponent = async ({ forceUpdate }) => {
329
+ *
330
+ * let selectedDates = ['2025-01-01'];
331
+ *
332
+ * return () => {
333
+ * return (
334
+ * <div>
335
+ * <p>Selected dates count: {selectedDates.length}</p>
336
+ * <drayman-year-calendar
337
+ * selectedDates={selectedDates}
338
+ * year={2025}
339
+ * onDayClick={async ({ date }) => {
340
+ * if (selectedDates.includes(date)) {
341
+ * selectedDates = selectedDates.filter((d) => d !== date);
342
+ * } else {
343
+ * selectedDates.push(date);
344
+ * }
345
+ * await forceUpdate();
346
+ * }}
347
+ * />
348
+ * </div>
349
+ * );
350
+ * }
351
+ * }
352
+ * ```
353
+ */
354
+ interface DraymanYearCalendarProps extends DraymanYearCalendar, DraymanElementsProps { }
316
355
  /**
317
356
  * # <drayman-claviz-charts \/>
318
357
  *