@xh/hoist 79.0.0-SNAPSHOT.1766017582086 → 79.0.0-SNAPSHOT.1766094533168

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 (50) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/admin/AppComponent.ts +9 -1
  3. package/admin/AppModel.ts +0 -4
  4. package/admin/tabs/cluster/instances/InstancesTab.ts +1 -1
  5. package/admin/tabs/cluster/instances/InstancesTabModel.ts +0 -1
  6. package/admin/tabs/userData/roles/details/RoleDetailsModel.ts +0 -1
  7. package/build/types/cmp/tab/TabContainer.d.ts +19 -4
  8. package/build/types/cmp/tab/TabContainerModel.d.ts +18 -19
  9. package/build/types/cmp/tab/Types.d.ts +61 -0
  10. package/build/types/cmp/tab/index.d.ts +1 -1
  11. package/build/types/data/RecordAction.d.ts +4 -1
  12. package/build/types/desktop/cmp/tab/TabSwitcher.d.ts +1 -1
  13. package/build/types/desktop/cmp/tab/dynamic/DynamicTabSwitcher.d.ts +7 -0
  14. package/build/types/desktop/cmp/tab/dynamic/DynamicTabSwitcherModel.d.ts +30 -0
  15. package/build/types/desktop/cmp/tab/dynamic/scroller/Scroller.d.ts +19 -0
  16. package/build/types/desktop/cmp/tab/dynamic/scroller/ScrollerModel.d.ts +23 -0
  17. package/build/types/desktop/cmp/tab/impl/Tab.d.ts +7 -2
  18. package/build/types/desktop/cmp/tab/impl/TabContainer.d.ts +1 -1
  19. package/build/types/desktop/cmp/tab/impl/TabContextMenuItems.d.ts +4 -0
  20. package/build/types/desktop/cmp/tab/index.d.ts +1 -0
  21. package/build/types/dynamics/desktop.d.ts +1 -0
  22. package/build/types/mobile/cmp/tab/impl/TabContainer.d.ts +1 -1
  23. package/build/types/utils/datetime/LocalDate.d.ts +2 -0
  24. package/cmp/tab/TabContainer.ts +19 -4
  25. package/cmp/tab/TabContainerModel.ts +113 -54
  26. package/cmp/tab/TabModel.ts +1 -2
  27. package/cmp/tab/Types.ts +80 -0
  28. package/cmp/tab/index.ts +1 -1
  29. package/data/RecordAction.ts +4 -1
  30. package/desktop/appcontainer/AppContainer.ts +3 -2
  31. package/desktop/cmp/grid/impl/filter/headerfilter/HeaderFilter.ts +1 -1
  32. package/desktop/cmp/grid/impl/filter/headerfilter/HeaderFilterModel.ts +0 -1
  33. package/desktop/cmp/tab/TabSwitcher.ts +18 -3
  34. package/desktop/cmp/tab/Tabs.scss +1 -0
  35. package/desktop/cmp/tab/dynamic/DynamicTabSwitcher.scss +53 -0
  36. package/desktop/cmp/tab/dynamic/DynamicTabSwitcher.ts +237 -0
  37. package/desktop/cmp/tab/dynamic/DynamicTabSwitcherModel.ts +167 -0
  38. package/desktop/cmp/tab/dynamic/scroller/Scroller.ts +69 -0
  39. package/desktop/cmp/tab/dynamic/scroller/ScrollerModel.ts +92 -0
  40. package/desktop/cmp/tab/impl/Tab.ts +30 -6
  41. package/desktop/cmp/tab/impl/TabContainer.ts +34 -9
  42. package/desktop/cmp/tab/impl/TabContextMenuItems.ts +21 -0
  43. package/desktop/cmp/tab/index.ts +1 -0
  44. package/dynamics/desktop.ts +2 -0
  45. package/mobile/cmp/tab/impl/TabContainer.ts +16 -9
  46. package/package.json +1 -1
  47. package/tsconfig.tsbuildinfo +1 -1
  48. package/utils/datetime/LocalDate.ts +28 -0
  49. package/build/types/cmp/tab/TabSwitcherProps.d.ts +0 -16
  50. package/cmp/tab/TabSwitcherProps.ts +0 -28
@@ -197,6 +197,34 @@ export class LocalDate {
197
197
  return LocalDate.from(this.moment.subtract(value, unit));
198
198
  }
199
199
 
200
+ addWeekdays(value): LocalDate {
201
+ if (value < 0) {
202
+ return this.subtractWeekdays(Math.abs(value));
203
+ }
204
+
205
+ let ret: LocalDate = this;
206
+ while (value > 0) {
207
+ ret = ret.nextWeekday();
208
+ value--;
209
+ }
210
+
211
+ return ret;
212
+ }
213
+
214
+ subtractWeekdays(value): LocalDate {
215
+ if (value < 0) {
216
+ return this.addWeekdays(Math.abs(value));
217
+ }
218
+
219
+ let ret: LocalDate = this;
220
+ while (value > 0) {
221
+ ret = ret.previousWeekday();
222
+ value--;
223
+ }
224
+
225
+ return ret;
226
+ }
227
+
200
228
  startOf(unit): LocalDate {
201
229
  this.ensureUnitValid(unit);
202
230
  return LocalDate.from(this.moment.startOf(unit));
@@ -1,16 +0,0 @@
1
- import { BoxProps, HoistProps, Side } from '@xh/hoist/core';
2
- import { TabContainerModel } from './TabContainerModel';
3
- export interface TabSwitcherProps extends HoistProps<TabContainerModel>, BoxProps {
4
- /** Relative position within the parent TabContainer. Defaults to 'top'. */
5
- orientation?: Side;
6
- /** True to animate the indicator when switching tabs. False (default) to change instantly. */
7
- animate?: boolean;
8
- /** Enable scrolling and place tabs that overflow into a menu. Default to false. */
9
- enableOverflow?: boolean;
10
- /** Width (in px) to render tabs. Only applies to horizontal orientations */
11
- tabWidth?: number;
12
- /** Minimum width (in px) to render tabs. Only applies to horizontal orientations */
13
- tabMinWidth?: number;
14
- /** Maximum width (in px) to render tabs. Only applies to horizontal orientations */
15
- tabMaxWidth?: number;
16
- }
@@ -1,28 +0,0 @@
1
- /*
2
- * This file belongs to Hoist, an application development toolkit
3
- * developed by Extremely Heavy Industries (www.xh.io | info@xh.io)
4
- *
5
- * Copyright © 2025 Extremely Heavy Industries Inc.
6
- */
7
- import {BoxProps, HoistProps, Side} from '@xh/hoist/core';
8
- import {TabContainerModel} from './TabContainerModel';
9
-
10
- export interface TabSwitcherProps extends HoistProps<TabContainerModel>, BoxProps {
11
- /** Relative position within the parent TabContainer. Defaults to 'top'. */
12
- orientation?: Side;
13
-
14
- /** True to animate the indicator when switching tabs. False (default) to change instantly. */
15
- animate?: boolean;
16
-
17
- /** Enable scrolling and place tabs that overflow into a menu. Default to false. */
18
- enableOverflow?: boolean;
19
-
20
- /** Width (in px) to render tabs. Only applies to horizontal orientations */
21
- tabWidth?: number;
22
-
23
- /** Minimum width (in px) to render tabs. Only applies to horizontal orientations */
24
- tabMinWidth?: number;
25
-
26
- /** Maximum width (in px) to render tabs. Only applies to horizontal orientations */
27
- tabMaxWidth?: number;
28
- }