@acorex/components 20.1.35 → 20.1.37

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 (92) hide show
  1. package/accordion/index.d.ts +6 -5
  2. package/autocomplete/index.d.ts +6 -2
  3. package/color-box/index.d.ts +1 -0
  4. package/command/index.d.ts +13 -3
  5. package/comment/index.d.ts +6 -0
  6. package/data-list/README.md +356 -0
  7. package/data-list/index.d.ts +102 -0
  8. package/data-table/index.d.ts +58 -2
  9. package/dialog/index.d.ts +29 -4
  10. package/drawer-2/index.d.ts +15 -0
  11. package/dropdown-button/index.d.ts +7 -2
  12. package/fesm2022/acorex-components-accordion.mjs +66 -61
  13. package/fesm2022/acorex-components-accordion.mjs.map +1 -1
  14. package/fesm2022/acorex-components-autocomplete.mjs +19 -3
  15. package/fesm2022/acorex-components-autocomplete.mjs.map +1 -1
  16. package/fesm2022/acorex-components-color-box.mjs +4 -0
  17. package/fesm2022/acorex-components-color-box.mjs.map +1 -1
  18. package/fesm2022/acorex-components-color-palette.mjs +1 -1
  19. package/fesm2022/acorex-components-color-palette.mjs.map +1 -1
  20. package/fesm2022/acorex-components-command.mjs +52 -8
  21. package/fesm2022/acorex-components-command.mjs.map +1 -1
  22. package/fesm2022/acorex-components-comment.mjs +7 -1
  23. package/fesm2022/acorex-components-comment.mjs.map +1 -1
  24. package/fesm2022/acorex-components-cron-job.mjs +6 -6
  25. package/fesm2022/acorex-components-cron-job.mjs.map +1 -1
  26. package/fesm2022/acorex-components-data-list.mjs +386 -0
  27. package/fesm2022/acorex-components-data-list.mjs.map +1 -0
  28. package/fesm2022/acorex-components-data-table.mjs +58 -2
  29. package/fesm2022/acorex-components-data-table.mjs.map +1 -1
  30. package/fesm2022/acorex-components-dialog.mjs +29 -4
  31. package/fesm2022/acorex-components-dialog.mjs.map +1 -1
  32. package/fesm2022/acorex-components-drawer-2.mjs +15 -0
  33. package/fesm2022/acorex-components-drawer-2.mjs.map +1 -1
  34. package/fesm2022/acorex-components-dropdown-button.mjs +7 -2
  35. package/fesm2022/acorex-components-dropdown-button.mjs.map +1 -1
  36. package/fesm2022/acorex-components-form.mjs +10 -0
  37. package/fesm2022/acorex-components-form.mjs.map +1 -1
  38. package/fesm2022/acorex-components-grid-layout-builder.mjs +115 -5
  39. package/fesm2022/acorex-components-grid-layout-builder.mjs.map +1 -1
  40. package/fesm2022/acorex-components-kbd.mjs +5 -5
  41. package/fesm2022/acorex-components-kbd.mjs.map +1 -1
  42. package/fesm2022/acorex-components-list.mjs +6 -14
  43. package/fesm2022/acorex-components-list.mjs.map +1 -1
  44. package/fesm2022/acorex-components-menu.mjs +12 -1
  45. package/fesm2022/acorex-components-menu.mjs.map +1 -1
  46. package/fesm2022/{acorex-components-modal-acorex-components-modal-BdrQgtUV.mjs → acorex-components-modal-acorex-components-modal-DTUAOsgv.mjs} +12 -11
  47. package/fesm2022/{acorex-components-modal-acorex-components-modal-BdrQgtUV.mjs.map → acorex-components-modal-acorex-components-modal-DTUAOsgv.mjs.map} +1 -1
  48. package/fesm2022/{acorex-components-modal-modal-content.component-DTrjX50k.mjs → acorex-components-modal-modal-content.component-Co2yaRpp.mjs} +20 -19
  49. package/fesm2022/acorex-components-modal-modal-content.component-Co2yaRpp.mjs.map +1 -0
  50. package/fesm2022/acorex-components-modal.mjs +1 -1
  51. package/fesm2022/acorex-components-otp.mjs +2 -0
  52. package/fesm2022/acorex-components-otp.mjs.map +1 -1
  53. package/fesm2022/acorex-components-paint.mjs +36 -1
  54. package/fesm2022/acorex-components-paint.mjs.map +1 -1
  55. package/fesm2022/acorex-components-phone-box.mjs +31 -4
  56. package/fesm2022/acorex-components-phone-box.mjs.map +1 -1
  57. package/fesm2022/acorex-components-popover.mjs +5 -5
  58. package/fesm2022/acorex-components-popover.mjs.map +1 -1
  59. package/fesm2022/acorex-components-query-builder.mjs +1 -1
  60. package/fesm2022/acorex-components-query-builder.mjs.map +1 -1
  61. package/fesm2022/acorex-components-rest-api-generator.mjs +1 -1
  62. package/fesm2022/acorex-components-rest-api-generator.mjs.map +1 -1
  63. package/fesm2022/acorex-components-rrule.mjs +1 -1
  64. package/fesm2022/acorex-components-rrule.mjs.map +1 -1
  65. package/fesm2022/acorex-components-scheduler.mjs +839 -63
  66. package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
  67. package/fesm2022/acorex-components-select-box.mjs +62 -19
  68. package/fesm2022/acorex-components-select-box.mjs.map +1 -1
  69. package/fesm2022/acorex-components-selection-list-2.mjs +5 -2
  70. package/fesm2022/acorex-components-selection-list-2.mjs.map +1 -1
  71. package/fesm2022/acorex-components-selection-list.mjs +7 -4
  72. package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
  73. package/fesm2022/acorex-components-tabs.mjs +2 -2
  74. package/fesm2022/acorex-components-tabs.mjs.map +1 -1
  75. package/fesm2022/acorex-components-tag-box.mjs +24 -12
  76. package/fesm2022/acorex-components-tag-box.mjs.map +1 -1
  77. package/fesm2022/acorex-components-text-box.mjs +10 -0
  78. package/fesm2022/acorex-components-text-box.mjs.map +1 -1
  79. package/fesm2022/acorex-components-wysiwyg.mjs +1 -1
  80. package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
  81. package/form/index.d.ts +10 -0
  82. package/grid-layout-builder/index.d.ts +115 -4
  83. package/list/index.d.ts +3 -9
  84. package/menu/index.d.ts +12 -0
  85. package/modal/index.d.ts +3 -2
  86. package/package.json +9 -5
  87. package/paint/index.d.ts +36 -1
  88. package/scheduler/index.d.ts +356 -242
  89. package/select-box/index.d.ts +11 -2
  90. package/tag-box/index.d.ts +2 -2
  91. package/text-box/index.d.ts +2 -0
  92. package/fesm2022/acorex-components-modal-modal-content.component-DTrjX50k.mjs.map +0 -1
@@ -136,28 +136,35 @@ class AXGridLayoutWidgetComponent {
136
136
  #eff;
137
137
  /**
138
138
  * Locks or unlocks the widget (prevents dragging and resizing).
139
- * @param state - If `true`, the widget will be locked.
139
+ *
140
+ * @param state - If true, the widget will be locked.
141
+ * @returns void - No return value. The widget lock state is updated.
140
142
  */
141
143
  setLockable(state) {
142
144
  this.updateWidgetOptions({ disableResize: state, disableDrag: state });
143
145
  }
144
146
  /**
145
147
  * Enables or disables resizing of the widget.
146
- * @param state - If `true`, resizing will be enabled.
148
+ *
149
+ * @param state - If true, resizing will be enabled.
150
+ * @returns void - No return value. The widget resize state is updated.
147
151
  */
148
152
  setResizable(state) {
149
153
  this.updateWidgetOptions({ disableResize: !state });
150
154
  }
151
155
  /**
152
156
  * Updates the widget options.
157
+ *
153
158
  * @param options - The new options for the widget.
159
+ * @returns void - No return value. The widget options are updated.
154
160
  */
155
161
  setOptions(options) {
156
162
  this.updateWidgetOptions(options);
157
163
  }
158
164
  /**
159
165
  * Returns the current options of the widget.
160
- * @returns The current widget options.
166
+ *
167
+ * @returns AXGridLayoutNode - The current widget options.
161
168
  */
162
169
  getOptions() {
163
170
  const gridstackNode = this.elementRef.nativeElement.gridstackNode;
@@ -167,7 +174,8 @@ class AXGridLayoutWidgetComponent {
167
174
  }
168
175
  /**
169
176
  * Returns the native DOM element of the widget.
170
- * @returns The native element.
177
+ *
178
+ * @returns AXGridLayoutWidgetElement - The native element.
171
179
  */
172
180
  get element() {
173
181
  return this.elementRef.nativeElement;
@@ -342,7 +350,13 @@ class AXGridLayoutContainerComponent extends NXComponent {
342
350
  }
343
351
  }
344
352
  //#endregion
345
- //#region Public Methods
353
+ /**
354
+ * Adds a widget to the grid layout.
355
+ *
356
+ * @param w - Widget configuration object.
357
+ * @param withAutoArrange - Whether to compact the grid before adding the widget.
358
+ * @returns AXGridLayoutWidgetElement | undefined - The created widget element or undefined if failed.
359
+ */
346
360
  addWidget(w, withAutoArrange = false) {
347
361
  if (withAutoArrange)
348
362
  this.compact();
@@ -354,39 +368,119 @@ class AXGridLayoutContainerComponent extends NXComponent {
354
368
  widgetElement.gridstackNode = removeUndefinedKeys(convertGridStackNodeToAXGridLayoutNode(node));
355
369
  return widgetElement;
356
370
  }
371
+ /**
372
+ * Compacts the grid layout.
373
+ *
374
+ * @param layout - Layout type for compacting ('list' or 'compact').
375
+ * @param doSort - Whether to sort items while compacting.
376
+ * @returns void - No return value. The grid layout is compacted.
377
+ */
357
378
  compact(layout = 'compact', doSort = true) {
358
379
  this.grid?.compact(layout, doSort);
359
380
  }
381
+ /**
382
+ * Sets the cell height of the grid.
383
+ *
384
+ * @param val - New cell height value.
385
+ * @param update - Whether to update the grid immediately.
386
+ * @returns void - No return value. The cell height is updated.
387
+ */
360
388
  setCellHeight(val, update = true) {
361
389
  this.grid?.cellHeight(val, update);
362
390
  }
391
+ /**
392
+ * Sets the number of columns in the grid.
393
+ *
394
+ * @param column - Number of columns.
395
+ * @param layout - Layout type for the change ('list', 'compact', 'moveScale', 'move', 'scale', or 'none').
396
+ * @returns void - No return value. The column count is updated.
397
+ */
363
398
  setColumn(column, layout = 'moveScale') {
364
399
  this.grid?.column(column, layout);
365
400
  }
401
+ /**
402
+ * Destroys the grid instance.
403
+ *
404
+ * @param removeDOM - Whether to remove DOM elements.
405
+ * @returns void - No return value. The grid instance is destroyed.
406
+ */
366
407
  destroy(removeDOM = true) {
367
408
  this.grid?.destroy(removeDOM);
368
409
  }
410
+ /**
411
+ * Enables or disables moving of widgets.
412
+ *
413
+ * @param state - Whether to enable moving.
414
+ * @param recurse - Whether to apply to all child widgets.
415
+ * @returns void - No return value. The move state is updated.
416
+ */
369
417
  setMovable(state, recurse) {
370
418
  this.grid?.enableMove(state, recurse);
371
419
  }
420
+ /**
421
+ * Enables or disables resizing of widgets.
422
+ *
423
+ * @param state - Whether to enable resizing.
424
+ * @param recurse - Whether to apply to all child widgets.
425
+ * @returns void - No return value. The resize state is updated.
426
+ */
372
427
  setResizable(state, recurse) {
373
428
  this.grid?.enableResize(state, recurse);
374
429
  }
430
+ /**
431
+ * Sets the float property of the grid.
432
+ *
433
+ * @param val - Whether to enable floating widgets.
434
+ * @returns void - No return value. The float state is updated.
435
+ */
375
436
  setFloat(val) {
376
437
  this.grid?.float(val);
377
438
  }
439
+ /**
440
+ * Sets the margin between grid items.
441
+ *
442
+ * @param value - Margin value (number in pixels or string with units).
443
+ * @returns void - No return value. The margin is updated.
444
+ */
378
445
  setMargin(value) {
379
446
  this.grid?.margin(value);
380
447
  }
448
+ /**
449
+ * Removes a specific widget from the grid.
450
+ *
451
+ * @param el - The widget element to remove.
452
+ * @param removeDOM - Whether to remove the DOM element.
453
+ * @param triggerEvent - Whether to trigger removal events.
454
+ * @returns void - No return value. The widget is removed.
455
+ */
381
456
  removeWidget(el, removeDOM = true, triggerEvent = true) {
382
457
  this.grid?.removeWidget(el, removeDOM, triggerEvent);
383
458
  }
459
+ /**
460
+ * Removes all widgets from the grid.
461
+ *
462
+ * @param removeDOM - Whether to remove DOM elements.
463
+ * @returns void - No return value. All widgets are removed.
464
+ */
384
465
  removeAll(removeDOM = true) {
385
466
  this.grid?.removeAll(removeDOM);
386
467
  }
468
+ /**
469
+ * Sets the animation state for the grid.
470
+ *
471
+ * @param doAnimate - Whether to enable animations.
472
+ * @returns void - No return value. The animation state is updated.
473
+ */
387
474
  setAnimation(doAnimate) {
388
475
  this.grid?.setAnimation(doAnimate);
389
476
  }
477
+ /**
478
+ * Sets up draggable functionality for external elements.
479
+ *
480
+ * @param dragIn - CSS selector string or array of HTML elements to make draggable.
481
+ * @param widgets - Optional widget configuration for dragged items.
482
+ * @returns Promise<void> - Promise that resolves when drag setup is complete.
483
+ */
390
484
  async setupDraggable(dragIn, widgets) {
391
485
  if (typeof dragIn === 'string') {
392
486
  document.querySelectorAll(dragIn).forEach((item) => {
@@ -401,16 +495,32 @@ class AXGridLayoutContainerComponent extends NXComponent {
401
495
  : undefined;
402
496
  GridStack.setupDragIn(dragIn, undefined, gridStackWidgets);
403
497
  }
498
+ /**
499
+ * Gets the current grid options.
500
+ *
501
+ * @returns AXGridLayoutOptions - Current grid configuration options.
502
+ */
404
503
  getOptions() {
405
504
  const opts = this.grid?.opts;
406
505
  if (!opts)
407
506
  return {};
408
507
  return removeUndefinedKeys(convertGridStackOptionsToAXGridLayoutOptions(opts));
409
508
  }
509
+ /**
510
+ * Gets all child widgets in the grid.
511
+ *
512
+ * @returns AXGridLayoutNode[] - Array of all child widget nodes.
513
+ */
410
514
  getChildren() {
411
515
  const children = this.grid?.engine.nodes ?? [];
412
516
  return children.map((node) => removeUndefinedKeys(convertGridStackNodeToAXGridLayoutNode(node)));
413
517
  }
518
+ /**
519
+ * Finds an empty space in the grid for a widget.
520
+ *
521
+ * @param input - Dimensions of the widget with height and width.
522
+ * @returns { x: number; y: number } - Object containing x and y coordinates of empty space.
523
+ */
414
524
  findEmptySpace(input) {
415
525
  const value = { h: input.height, w: input.height };
416
526
  this.grid?.engine.findEmptyPosition(value);