@bootkit/ng0 0.0.0-alpha.4 → 0.0.0-alpha.40

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 (100) hide show
  1. package/common/index.d.ts +263 -7
  2. package/components/accordion/index.d.ts +13 -3
  3. package/components/backdrop/index.d.ts +12 -0
  4. package/components/dropdown/index.d.ts +156 -0
  5. package/components/form-field/index.d.ts +24 -41
  6. package/components/list/index.d.ts +260 -0
  7. package/components/modal/index.d.ts +21 -3
  8. package/components/nav/index.d.ts +23 -19
  9. package/components/offcanvas/index.d.ts +13 -5
  10. package/components/pagination/index.d.ts +34 -8
  11. package/components/select/index.d.ts +160 -0
  12. package/components/sidenav/index.d.ts +125 -0
  13. package/components/table/index.d.ts +191 -59
  14. package/components/vertical-menu/index.d.ts +61 -0
  15. package/data/index.d.ts +103 -38
  16. package/date/index.d.ts +34 -0
  17. package/fesm2022/bootkit-ng0-common.mjs +289 -12
  18. package/fesm2022/bootkit-ng0-common.mjs.map +1 -1
  19. package/fesm2022/bootkit-ng0-components-accordion.mjs +33 -26
  20. package/fesm2022/bootkit-ng0-components-accordion.mjs.map +1 -1
  21. package/fesm2022/bootkit-ng0-components-backdrop.mjs +46 -0
  22. package/fesm2022/bootkit-ng0-components-backdrop.mjs.map +1 -0
  23. package/fesm2022/bootkit-ng0-components-button.mjs +12 -12
  24. package/fesm2022/bootkit-ng0-components-button.mjs.map +1 -1
  25. package/fesm2022/bootkit-ng0-components-card.mjs +12 -12
  26. package/fesm2022/bootkit-ng0-components-card.mjs.map +1 -1
  27. package/fesm2022/bootkit-ng0-components-code.mjs +10 -10
  28. package/fesm2022/bootkit-ng0-components-code.mjs.map +1 -1
  29. package/fesm2022/bootkit-ng0-components-collapse.mjs +16 -16
  30. package/fesm2022/bootkit-ng0-components-collapse.mjs.map +1 -1
  31. package/fesm2022/bootkit-ng0-components-confirmation.mjs +13 -13
  32. package/fesm2022/bootkit-ng0-components-confirmation.mjs.map +1 -1
  33. package/fesm2022/bootkit-ng0-components-dropdown.mjs +308 -0
  34. package/fesm2022/bootkit-ng0-components-dropdown.mjs.map +1 -0
  35. package/fesm2022/bootkit-ng0-components-form-field.mjs +62 -84
  36. package/fesm2022/bootkit-ng0-components-form-field.mjs.map +1 -1
  37. package/fesm2022/bootkit-ng0-components-list.mjs +564 -0
  38. package/fesm2022/bootkit-ng0-components-list.mjs.map +1 -0
  39. package/fesm2022/bootkit-ng0-components-modal.mjs +41 -24
  40. package/fesm2022/bootkit-ng0-components-modal.mjs.map +1 -1
  41. package/fesm2022/bootkit-ng0-components-nav.mjs +59 -60
  42. package/fesm2022/bootkit-ng0-components-nav.mjs.map +1 -1
  43. package/fesm2022/bootkit-ng0-components-offcanvas.mjs +20 -13
  44. package/fesm2022/bootkit-ng0-components-offcanvas.mjs.map +1 -1
  45. package/fesm2022/bootkit-ng0-components-overlay.mjs.map +1 -1
  46. package/fesm2022/bootkit-ng0-components-pagination.mjs +59 -24
  47. package/fesm2022/bootkit-ng0-components-pagination.mjs.map +1 -1
  48. package/fesm2022/bootkit-ng0-components-popover.mjs +11 -11
  49. package/fesm2022/bootkit-ng0-components-popover.mjs.map +1 -1
  50. package/fesm2022/bootkit-ng0-components-select.mjs +447 -0
  51. package/fesm2022/bootkit-ng0-components-select.mjs.map +1 -0
  52. package/fesm2022/bootkit-ng0-components-sidenav.mjs +290 -0
  53. package/fesm2022/bootkit-ng0-components-sidenav.mjs.map +1 -0
  54. package/fesm2022/bootkit-ng0-components-stepper.mjs +14 -14
  55. package/fesm2022/bootkit-ng0-components-stepper.mjs.map +1 -1
  56. package/fesm2022/bootkit-ng0-components-table.mjs +303 -159
  57. package/fesm2022/bootkit-ng0-components-table.mjs.map +1 -1
  58. package/fesm2022/bootkit-ng0-components-toast.mjs +6 -6
  59. package/fesm2022/bootkit-ng0-components-toast.mjs.map +1 -1
  60. package/fesm2022/bootkit-ng0-components-tooltip.mjs +9 -9
  61. package/fesm2022/bootkit-ng0-components-tooltip.mjs.map +1 -1
  62. package/fesm2022/bootkit-ng0-components-vertical-menu.mjs +161 -0
  63. package/fesm2022/bootkit-ng0-components-vertical-menu.mjs.map +1 -0
  64. package/fesm2022/bootkit-ng0-data.mjs +152 -39
  65. package/fesm2022/bootkit-ng0-data.mjs.map +1 -1
  66. package/fesm2022/bootkit-ng0-date.mjs +50 -0
  67. package/fesm2022/bootkit-ng0-date.mjs.map +1 -0
  68. package/fesm2022/bootkit-ng0-file.mjs.map +1 -1
  69. package/fesm2022/bootkit-ng0-form.mjs +336 -264
  70. package/fesm2022/bootkit-ng0-form.mjs.map +1 -1
  71. package/fesm2022/bootkit-ng0-http.mjs +40 -5
  72. package/fesm2022/bootkit-ng0-http.mjs.map +1 -1
  73. package/fesm2022/bootkit-ng0-layouts-layout1.mjs +317 -0
  74. package/fesm2022/bootkit-ng0-layouts-layout1.mjs.map +1 -0
  75. package/fesm2022/bootkit-ng0-localization-locales.mjs +101 -0
  76. package/fesm2022/bootkit-ng0-localization-locales.mjs.map +1 -0
  77. package/fesm2022/bootkit-ng0-localization.mjs +431 -105
  78. package/fesm2022/bootkit-ng0-localization.mjs.map +1 -1
  79. package/fesm2022/bootkit-ng0-platform-browser.mjs +179 -0
  80. package/fesm2022/bootkit-ng0-platform-browser.mjs.map +1 -0
  81. package/fesm2022/bootkit-ng0-routing.mjs +80 -0
  82. package/fesm2022/bootkit-ng0-routing.mjs.map +1 -0
  83. package/fesm2022/bootkit-ng0-script.mjs +3 -3
  84. package/fesm2022/bootkit-ng0-script.mjs.map +1 -1
  85. package/fesm2022/bootkit-ng0-security.mjs +16 -16
  86. package/fesm2022/bootkit-ng0-security.mjs.map +1 -1
  87. package/fesm2022/bootkit-ng0-utils.mjs +75 -0
  88. package/fesm2022/bootkit-ng0-utils.mjs.map +1 -0
  89. package/fesm2022/bootkit-ng0.mjs +2 -2
  90. package/fesm2022/bootkit-ng0.mjs.map +1 -1
  91. package/form/index.d.ts +94 -62
  92. package/http/index.d.ts +35 -4
  93. package/index.d.ts +2 -2
  94. package/layouts/layout1/index.d.ts +201 -0
  95. package/localization/index.d.ts +231 -42
  96. package/localization/locales/index.d.ts +7 -0
  97. package/package.json +66 -18
  98. package/platform/browser/index.d.ts +88 -0
  99. package/routing/index.d.ts +124 -0
  100. package/utils/index.d.ts +42 -0
@@ -1 +1 @@
1
- {"version":3,"file":"bootkit-ng0-security.mjs","sources":["../../../projects/ng0/security/user.ts","../../../projects/ng0/security/user-store.ts","../../../projects/ng0/security/claim.directive.ts","../../../projects/ng0/security/guest-user.directive.ts","../../../projects/ng0/security/security.module.ts","../../../projects/ng0/security/public-api.ts","../../../projects/ng0/security/bootkit-ng0-security.ts"],"sourcesContent":["import { ClaimLike, ClaimObject } from '@bootkit/ng0/common';\r\n\r\n/** User */\r\nexport class User {\r\n constructor(public readonly claims: string[]) {\r\n }\r\n\r\n public hasClaims(claims: string[]): boolean {\r\n return claims.every(x => this.claims.some(y => x === y));\r\n }\r\n\r\n public hasAnyClaim(claims: string[]): boolean {\r\n return claims.length == 0 || claims.some(x => this.claims.some(y => x === y));\r\n }\r\n\r\n public hasClaim(claim: ClaimLike): boolean {\r\n var type = typeof claim;\r\n if (type === 'string') {\r\n return this.claims.some(x => x === claim);\r\n }\r\n\r\n if (type === 'object') {\r\n const co = claim as ClaimObject;\r\n if (co?.any && co?.all) {\r\n throw Error('Setting \"any\" and \"all\" at the same time is not valid.');\r\n }\r\n\r\n if (Array.isArray(co?.any)) {\r\n return this.hasAnyClaim(co.any);\r\n }\r\n if (Array.isArray(co?.all)) {\r\n return this.hasClaims(co.all);\r\n }\r\n }\r\n\r\n throw Error('Invalid claim');\r\n }\r\n}\r\n","import { User } from './user';\r\nimport { Injectable, signal } from '@angular/core';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class UserStore<U extends User = User> {\r\n public readonly user = signal<U | null | undefined>(undefined);\r\n\r\n constructor() {\r\n }\r\n}","import { Directive, TemplateRef, ViewContainerRef, input, effect } from '@angular/core';\r\n\r\nimport { UserStore } from './user-store';\r\nimport { ClaimLike } from '@bootkit/ng0/common';\r\n\r\n@Directive({\r\n selector: '[ng0Claim]',\r\n exportAs: 'ng0Claim',\r\n standalone: true\r\n})\r\nexport class UserDirective {\r\n public claim = input<ClaimLike | null | undefined>(undefined, { alias: 'ng0Claim' });\r\n private _viewCreated = false;\r\n\r\n constructor(\r\n templateRef: TemplateRef<any>,\r\n viewContainer: ViewContainerRef,\r\n userStore: UserStore,\r\n ) {\r\n effect(() => {\r\n let claim = this.claim();\r\n let user = userStore.user();\r\n let show = !user ? false : (claim == undefined ? true : user.hasClaim(claim))\r\n\r\n if (show && !this._viewCreated) {\r\n viewContainer.createEmbeddedView(templateRef);\r\n this._viewCreated = true;\r\n } else if (!show && this._viewCreated) {\r\n viewContainer.clear();\r\n this._viewCreated = false;\r\n }\r\n })\r\n }\r\n}\r\n","import { Directive, TemplateRef, ViewContainerRef, effect } from '@angular/core';\r\nimport { UserStore } from './user-store';\r\n\r\n@Directive({\r\n selector: '[ng0GuestUser]',\r\n exportAs: 'ng0GuestUser',\r\n standalone: true\r\n})\r\nexport class GuestUserDirective {\r\n private _created = false;\r\n\r\n constructor(\r\n templateRef: TemplateRef<any>,\r\n viewContainer: ViewContainerRef,\r\n userStore: UserStore,\r\n ) {\r\n effect(() => {\r\n let show = userStore.user() == undefined\r\n\r\n if (show && !this._created) {\r\n viewContainer.createEmbeddedView(templateRef);\r\n this._created = true;\r\n } else if (!show && this._created) {\r\n viewContainer.clear();\r\n this._created = false;\r\n }\r\n })\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { UserDirective } from './claim.directive';\r\nimport { GuestUserDirective } from './guest-user.directive';\r\n\r\nconst items = [\r\n UserDirective,\r\n GuestUserDirective\r\n]\r\n\r\n@NgModule({\r\n imports: items,\r\n exports: items\r\n})\r\nexport class SecurityModule { }\r\n","// export * from './types';\r\nexport * from './user';\r\nexport * from './user-store';\r\nexport * from './claim.directive';\r\nexport * from './guest-user.directive';\r\nexport * from './security.module';\r\n ","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.UserStore"],"mappings":";;;AAEA;MACa,IAAI,CAAA;AACe,IAAA,MAAA;AAA5B,IAAA,WAAA,CAA4B,MAAgB,EAAA;QAAhB,IAAM,CAAA,MAAA,GAAN,MAAM;;AAG3B,IAAA,SAAS,CAAC,MAAgB,EAAA;QAC7B,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;;AAGrD,IAAA,WAAW,CAAC,MAAgB,EAAA;AAC/B,QAAA,OAAO,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;;AAG1E,IAAA,QAAQ,CAAC,KAAgB,EAAA;AAC5B,QAAA,IAAI,IAAI,GAAG,OAAO,KAAK;AACvB,QAAA,IAAI,IAAI,KAAK,QAAQ,EAAE;AACnB,YAAA,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC;;AAG7C,QAAA,IAAI,IAAI,KAAK,QAAQ,EAAE;YACnB,MAAM,EAAE,GAAG,KAAoB;YAC/B,IAAI,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,GAAG,EAAE;AACpB,gBAAA,MAAM,KAAK,CAAC,wDAAwD,CAAC;;YAGzE,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE;gBACxB,OAAO,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,GAAG,CAAC;;YAEnC,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE;gBACxB,OAAO,IAAI,CAAC,SAAS,C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ZD;;ACAA;;AAEG;;;;"}
1
+ {"version":3,"file":"bootkit-ng0-security.mjs","sources":["../../../projects/ng0/security/user.ts","../../../projects/ng0/security/user-store.ts","../../../projects/ng0/security/claim.directive.ts","../../../projects/ng0/security/guest-user.directive.ts","../../../projects/ng0/security/security.module.ts","../../../projects/ng0/security/public-api.ts","../../../projects/ng0/security/bootkit-ng0-security.ts"],"sourcesContent":["import { ClaimLike, ClaimObject } from '@bootkit/ng0/common';\r\n\r\n/** User */\r\nexport class User {\r\n constructor(public readonly claims: string[]) {\r\n }\r\n\r\n public hasClaims(claims: string[]): boolean {\r\n return claims.every(x => this.claims.some(y => x === y));\r\n }\r\n\r\n public hasAnyClaim(claims: string[]): boolean {\r\n return claims.length == 0 || claims.some(x => this.claims.some(y => x === y));\r\n }\r\n\r\n public hasClaim(claim: ClaimLike): boolean {\r\n var type = typeof claim;\r\n if (type === 'string') {\r\n return this.claims.some(x => x === claim);\r\n }\r\n\r\n if (type === 'object') {\r\n const co = claim as ClaimObject;\r\n if (co?.any && co?.all) {\r\n throw Error('Setting \"any\" and \"all\" at the same time is not valid.');\r\n }\r\n\r\n if (Array.isArray(co?.any)) {\r\n return this.hasAnyClaim(co.any);\r\n }\r\n if (Array.isArray(co?.all)) {\r\n return this.hasClaims(co.all);\r\n }\r\n }\r\n\r\n throw Error('Invalid claim');\r\n }\r\n}\r\n","import { User } from './user';\r\nimport { Injectable, signal } from '@angular/core';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class UserStore<U extends User = User> {\r\n public readonly user = signal<U | null | undefined>(undefined);\r\n\r\n constructor() {\r\n }\r\n}","import { Directive, TemplateRef, ViewContainerRef, input, effect } from '@angular/core';\r\n\r\nimport { UserStore } from './user-store';\r\nimport { ClaimLike } from '@bootkit/ng0/common';\r\n\r\n@Directive({\r\n selector: '[ng0Claim]',\r\n exportAs: 'ng0Claim',\r\n standalone: true\r\n})\r\nexport class UserDirective {\r\n public claim = input<ClaimLike | null | undefined>(undefined, { alias: 'ng0Claim' });\r\n private _viewCreated = false;\r\n\r\n constructor(\r\n templateRef: TemplateRef<any>,\r\n viewContainer: ViewContainerRef,\r\n userStore: UserStore,\r\n ) {\r\n effect(() => {\r\n let claim = this.claim();\r\n let user = userStore.user();\r\n let show = !user ? false : (claim == undefined ? true : user.hasClaim(claim))\r\n\r\n if (show && !this._viewCreated) {\r\n viewContainer.createEmbeddedView(templateRef);\r\n this._viewCreated = true;\r\n } else if (!show && this._viewCreated) {\r\n viewContainer.clear();\r\n this._viewCreated = false;\r\n }\r\n })\r\n }\r\n}\r\n","import { Directive, TemplateRef, ViewContainerRef, effect } from '@angular/core';\r\nimport { UserStore } from './user-store';\r\n\r\n@Directive({\r\n selector: '[ng0GuestUser]',\r\n exportAs: 'ng0GuestUser',\r\n standalone: true\r\n})\r\nexport class GuestUserDirective {\r\n private _created = false;\r\n\r\n constructor(\r\n templateRef: TemplateRef<any>,\r\n viewContainer: ViewContainerRef,\r\n userStore: UserStore,\r\n ) {\r\n effect(() => {\r\n let show = userStore.user() == undefined\r\n\r\n if (show && !this._created) {\r\n viewContainer.createEmbeddedView(templateRef);\r\n this._created = true;\r\n } else if (!show && this._created) {\r\n viewContainer.clear();\r\n this._created = false;\r\n }\r\n })\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { UserDirective } from './claim.directive';\r\nimport { GuestUserDirective } from './guest-user.directive';\r\n\r\nconst items = [\r\n UserDirective,\r\n GuestUserDirective\r\n]\r\n\r\n@NgModule({\r\n imports: items,\r\n exports: items\r\n})\r\nexport class SecurityModule { }\r\n","// export * from './types';\r\nexport * from './user';\r\nexport * from './user-store';\r\nexport * from './claim.directive';\r\nexport * from './guest-user.directive';\r\nexport * from './security.module';\r\n ","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.UserStore"],"mappings":";;;AAEA;MACa,IAAI,CAAA;AACe,IAAA,MAAA;AAA5B,IAAA,WAAA,CAA4B,MAAgB,EAAA;QAAh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ular/core';
2
+ import { interval, animationFrameScheduler, map, takeWhile } from 'rxjs';
3
+
4
+ /**
5
+ * A counter that animates a numeric value from a start to an end value over a specified duration using an easing function.
6
+ */
7
+ class Counter {
8
+ from;
9
+ to;
10
+ duration;
11
+ _subscription;
12
+ value = signal(0, ...(ngDevMode ? [{ debugName: "value" }] : []));
13
+ running = signal(false, ...(ngDevMode ? [{ debugName: "running" }] : []));
14
+ easing;
15
+ constructor(from, to, duration = 1000, easing, currentValue) {
16
+ this.from = from;
17
+ this.to = to;
18
+ this.duration = duration;
19
+ if (to < from || duration <= 0) {
20
+ throw new Error('Invalid params');
21
+ }
22
+ this.easing = easing ?? easingFunctions.linear;
23
+ this.value.set(currentValue != null ? currentValue : this.from);
24
+ }
25
+ /**
26
+ * Resets the counter and starts it.
27
+ * This method should be called in a browser environment.
28
+ * @returns void
29
+ */
30
+ start() {
31
+ if (this.running())
32
+ return;
33
+ this.value.set(this.from);
34
+ this.running.set(true);
35
+ const startTime = performance.now();
36
+ const from = this.from;
37
+ const change = this.to - this.from;
38
+ this._subscription = interval(0, animationFrameScheduler)
39
+ .pipe(map(() => performance.now() - startTime), takeWhile(time => time <= this.duration, true), map(elapsed => {
40
+ const t = Math.min(1, elapsed / this.duration);
41
+ return from + change * this.easing(t);
42
+ }))
43
+ .subscribe({
44
+ next: val => this.value.set(val),
45
+ complete: () => {
46
+ this.running.set(false);
47
+ }
48
+ });
49
+ }
50
+ /**
51
+ * Stops the counter animation.
52
+ */
53
+ stop() {
54
+ this._subscription?.unsubscribe();
55
+ this.running.set(false);
56
+ }
57
+ }
58
+ /**
59
+ * A collection of common easing functions for animations.
60
+ */
61
+ const easingFunctions = {
62
+ linear: (t) => t,
63
+ easeIn: (t) => t * t,
64
+ easeOut: (t) => t * (2 - t),
65
+ easeInOut: (t) => t < 0.5 ? (2 * t * t) : (-1 + (4 - 2 * t) * t),
66
+ smooth: (t) => t * t * (3 - 2 * t),
67
+ // smoother: (t: number) => t * t * t * (t * (6 - 15 * t) + 10)
68
+ };
69
+
70
+ /**
71
+ * Generated bundle index. Do not edit.
72
+ */
73
+
74
+ export { Counter, easingFunctions };
75
+ //# sourceMappingURL=bootkit-ng0-utils.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bootkit-ng0-utils.mjs","sources":["../../../projects/ng0/utils/counter.ts","../../../projects/ng0/utils/bootkit-ng0-utils.ts"],"sourcesContent":["\r\nimport { signal } from '@angular/core';\r\nimport { animationFrameScheduler, interval, map, Subscription, takeWhile } from 'rxjs';\r\n\r\n/**\r\n * Easing function type definition.\r\n */\r\nexport type EasingFn = (t: number) => number;\r\n\r\n/**\r\n * A counter that animates a numeric value from a start to an end value over a specified duration using an easing function.\r\n */\r\nexport class Counter {\r\n private _subscription?: Subscription;\r\n public readonly value = signal(0);\r\n public readonly running = signal(false);\r\n public readonly easing: EasingFn;\r\n\r\n constructor(\r\n public readonly from: number,\r\n public readonly to: number,\r\n public readonly duration = 1000,\r\n easing?: EasingFn,\r\n currentValue?: number) {\r\n\r\n if (to < from || duration <= 0) {\r\n throw new Error('Invalid params');\r\n }\r\n\r\n this.easing = easing ?? easingFunctions.linear;\r\n this.value.set(currentValue != null ? currentValue : this.from);\r\n }\r\n\r\n /**\r\n * Resets the counter and starts it.\r\n * This method should be called in a browser environment.\r\n * @returns void\r\n */\r\n public start() {\r\n if (this.running()) return;\r\n\r\n this.value.set(this.from);\r\n this.running.set(true);\r\n\r\n const startTime = performance.now();\r\n const from = this.from;\r\n const change = this.to - this.from;\r\n\r\n this._subscription = interval(0, animationFrameScheduler)\r\n .pipe(\r\n map(() => performance.now() - startTime),\r\n takeWhile(time => time <= this.duration, true),\r\n map(elapsed => {\r\n const t = Math.min(1, elapsed / this.duration);\r\n return from + change * this.easing(t);\r\n })\r\n )\r\n .subscribe({\r\n next: val => this.value.set(val),\r\n complete: () => {\r\n this.running.set(false)\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Stops the counter animation.\r\n */\r\n public stop() {\r\n this._subscription?.unsubscribe();\r\n this.running.set(false);\r\n }\r\n}\r\n\r\n/**\r\n * A collection of common easing functions for animations.\r\n */\r\nexport const easingFunctions = {\r\n linear: (t: number) => t,\r\n easeIn: (t: number) => t * t,\r\n easeOut: (t: number) => t * (2 - t),\r\n easeInOut: (t: number) => t < 0.5 ? (2 * t * t) : (-1 + (4 - 2 * t) * t),\r\n smooth: (t: number) => t * t * (3 - 2 * t),\r\n // smoother: (t: number) => t * t * t * (t * (6 - 15 * t) + 10)\r\n};","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;AASA;;AAEG;MACU,OAAO,CAAA;AAOA,IAAA,IAAA;AACA,IAAA,EAAA;AACA,IAAA,QAAA;AARV,IAAA,aAAa;AACL,IAAA,KAAK,GAAG,MAAM,CAAC,CAAC,iDAAC;AACjB,IAAA,OAAO,GAAG,MAAM,CAAC,KAAK,mDAAC;AACvB,IAAA,MAAM;IAEtB,WAAA,CACkB,IAAY,EACZ,EAAU,EACV,WAAW,IAAI,EAC/B,MAAiB,EACjB,YAAqB,EAAA;QAJL,IAAA,CAAA,IAAI,GAAJ,IAAI;QACJ,IAAA,CAAA,EAAE,GAAF,EAAE;QACF,IAAA,CAAA,QAAQ,GAAR,QAAQ;QAIxB,IAAI,EAAE,GAAG,IAAI,IAAI,QAAQ,IAAI,CAAC,EAAE;AAC9B,YAAA,MAAM,IAAI,KAAK,CAAC,gBAAgB,CAAC;QACnC;QAEA,IAAI,CAAC,MAAM,GAAG,MAAM,IAAI,eAAe,CAAC,MAAM;AAC9C,QAAA,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,YAAY,IAAI,IAAI,GAAG,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC;IACjE;AAEA;;;;AAIG;IACI,KAAK,GAAA;QACV,IAAI,IAAI,CAAC,OAAO,EAAE;YAAE;QAEpB,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;AACzB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,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACnC,IAAA,SAAS,EAAE,CAAC,CAAS,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACxE,IAAA,MAAM,EAAE,CAAC,CAAS,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;;;;AClF5C;;AAEG;;;;"}
@@ -1,4 +1,4 @@
1
- const LibName = 'bootkit/angular-pro';
1
+ const libName = 'bootkit/ng0';
2
2
 
3
3
  /*
4
4
  * Public API Surface of bootkit
@@ -8,5 +8,5 @@ const LibName = 'bootkit/angular-pro';
8
8
  * Generated bundle index. Do not edit.
9
9
  */
10
10
 
11
- export { LibName };
11
+ export { libName };
12
12
  //# sourceMappingURL=bootkit-ng0.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"bootkit-ng0.mjs","sources":["../../../projects/ng0/src/lib/index.ts","../../../projects/ng0/src/public-api.ts","../../../projects/ng0/src/bootkit-ng0.ts"],"sourcesContent":["export * from './types';\r\n \r\nexport const LibName = 'bootkit/angular-pro';","/*\r\n * Public API Surface of bootkit\r\n */\r\n\r\nexport * from './lib';\r\n \r\n \r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAEO,MAAM,OAAO,GAAG;;ACFvB;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"bootkit-ng0.mjs","sources":["../../../projects/ng0/src/lib/index.ts","../../../projects/ng0/src/public-api.ts","../../../projects/ng0/src/bootkit-ng0.ts"],"sourcesContent":["export const libName = 'bootkit/ng0';","/*\r\n * Public API Surface of bootkit\r\n */\r\n\r\nexport * from './lib';\r\n \r\n \r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAO,MAAM,OAAO,GAAG;;ACAvB;;AAEG;;ACFH;;AAEG;;;;"}
package/form/index.d.ts CHANGED
@@ -1,6 +1,93 @@
1
1
  import * as i0 from '@angular/core';
2
- import { OnInit, OnChanges, ElementRef, SimpleChanges, Renderer2 } from '@angular/core';
3
- import { Validator, AbstractControl, FormControl, ValidationErrors, ValidatorFn, ControlValueAccessor } from '@angular/forms';
2
+ import { OnInit, OnChanges, ElementRef, SimpleChanges } from '@angular/core';
3
+ import { ControlValueAccessor, Validator, AbstractControl, ValidationErrors, FormControl, ValidatorFn } from '@angular/forms';
4
+
5
+ declare class FocusDirective implements OnInit, OnChanges {
6
+ private elementRef;
7
+ /**
8
+ *
9
+ */
10
+ focusOnLoad: boolean;
11
+ focusWhen?: boolean;
12
+ private focused;
13
+ constructor(elementRef: ElementRef);
14
+ ngOnInit(): void;
15
+ ngOnChanges(changes: SimpleChanges): void;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<FocusDirective, never>;
17
+ static ɵdir: i0.ɵɵDirectiveDeclaration<FocusDirective, "[ng0Focus]", ["ng0Focus"], { "focusOnLoad": { "alias": "focusOnLoad"; "required": false; }; "focusWhen": { "alias": "focusWhen"; "required": false; }; }, {}, never, never, true, never>;
18
+ }
19
+
20
+ /**
21
+ * Directive to allow only number input in text fields.
22
+ * It supports integer and decimal numbers, negative numbers, min/max values, thousands separator.
23
+ */
24
+ declare class NumberDirective implements ControlValueAccessor {
25
+ private _value?;
26
+ private _isDisabled?;
27
+ private _decimalSeparator;
28
+ private _thousandsSeparator;
29
+ private _onChangeCallback?;
30
+ private _onTouchedCallback?;
31
+ private _elmRef;
32
+ private _renderer;
33
+ /**
34
+ * The minimum number of digits to display after the decimal point.
35
+ * Applied only when 'numberType' is set to 'decimal'.
36
+ * @default 1
37
+ */
38
+ minFractionDigits: i0.InputSignalWithTransform<number, unknown>;
39
+ /**
40
+ * The maximum number of digits to display after the decimal point.
41
+ * Applied only when 'numberType' is set to 'decimal'.
42
+ * @default 2
43
+ */
44
+ maxFractionDigits: i0.InputSignalWithTransform<number, unknown>;
45
+ /**
46
+ * Whether to use grouping separators, such as thousands separators
47
+ * @default false
48
+ */
49
+ useGrouping: i0.InputSignalWithTransform<boolean, unknown>;
50
+ /**
51
+ * Type of numbers to allow
52
+ * 'decimal' - allow decimal numbers
53
+ * 'integer' - allow integer numbers only
54
+ * @default 'integer'
55
+ */
56
+ numberType: i0.InputSignal<"integer" | "decimal">;
57
+ constructor();
58
+ ngOnInit(): void;
59
+ registerOnChange(fn: any): void;
60
+ registerOnTouched(fn: any): void;
61
+ setDisabledState?(isDisabled: boolean): void;
62
+ writeValue(value: any): void;
63
+ private _onKeyDown;
64
+ private _onInput;
65
+ private _formatIntegerPart;
66
+ private _onBlur;
67
+ private _onPaste;
68
+ private _getInputState;
69
+ private _formatNumber;
70
+ private _isKeyAllowed;
71
+ private _setProperty;
72
+ static ɵfac: i0.ɵɵFactoryDeclaration<NumberDirective, never>;
73
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NumberDirective, "[ng0Number]", never, { "minFractionDigits": { "alias": "minFractionDigits"; "required": false; "isSignal": true; }; "maxFractionDigits": { "alias": "maxFractionDigits"; "required": false; "isSignal": true; }; "useGrouping": { "alias": "useGrouping"; "required": false; "isSignal": true; }; "numberType": { "alias": "numberType"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
74
+ }
75
+
76
+ /** Min validator */
77
+ declare class MinValidatorDirective implements Validator {
78
+ min: i0.InputSignalWithTransform<number, string | number | null | undefined>;
79
+ validate(control: AbstractControl): ValidationErrors | null;
80
+ static ɵfac: i0.ɵɵFactoryDeclaration<MinValidatorDirective, never>;
81
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MinValidatorDirective, "input[type=text][ng0Number][min]", ["ng0Min"], { "min": { "alias": "min"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
82
+ }
83
+
84
+ /** Max validator */
85
+ declare class MaxValidatorDirective implements Validator {
86
+ max: i0.InputSignalWithTransform<number, string | number | null | undefined>;
87
+ validate(control: AbstractControl): ValidationErrors | null;
88
+ static ɵfac: i0.ɵɵFactoryDeclaration<MaxValidatorDirective, never>;
89
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MaxValidatorDirective, "input[type=text][ng0Number][max]", ["ng0Max"], { "max": { "alias": "max"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
90
+ }
4
91
 
5
92
  declare class EqualWithValidatorDirective implements Validator {
6
93
  targetValue?: string;
@@ -29,67 +116,12 @@ declare class CustomValidatorDirective implements Validator {
29
116
  static ɵdir: i0.ɵɵDirectiveDeclaration<CustomValidatorDirective, "[ng0CustomValidator]", ["ng0CustomValidator"], { "validator": { "alias": "ng0CustomValidator"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
30
117
  }
31
118
 
32
- declare class ValidationModule {
33
- static ɵfac: i0.ɵɵFactoryDeclaration<ValidationModule, never>;
34
- static ɵmod: i0.ɵɵNgModuleDeclaration<ValidationModule, never, [typeof EqualWithValidatorDirective, typeof UrlValidatorDirective, typeof CustomValidatorDirective], [typeof EqualWithValidatorDirective, typeof UrlValidatorDirective, typeof CustomValidatorDirective]>;
35
- static ɵinj: i0.ɵɵInjectorDeclaration<ValidationModule>;
119
+ declare class FormModule {
120
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormModule, never>;
121
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FormModule, never, [typeof NumberDirective, typeof MinValidatorDirective, typeof MaxValidatorDirective, typeof EqualWithValidatorDirective, typeof UrlValidatorDirective, typeof CustomValidatorDirective], [typeof NumberDirective, typeof MinValidatorDirective, typeof MaxValidatorDirective, typeof EqualWithValidatorDirective, typeof UrlValidatorDirective, typeof CustomValidatorDirective]>;
122
+ static ɵinj: i0.ɵɵInjectorDeclaration<FormModule>;
36
123
  }
37
124
 
38
125
  declare function equalWithValidator(targetValue?: string, inequalityMessage?: string): ValidatorFn;
39
126
 
40
- declare class FocusDirective implements OnInit, OnChanges {
41
- private elementRef;
42
- focusOnLoad: boolean;
43
- focusWhen?: boolean;
44
- private focused;
45
- constructor(elementRef: ElementRef);
46
- ngOnInit(): void;
47
- ngOnChanges(changes: SimpleChanges): void;
48
- static ɵfac: i0.ɵɵFactoryDeclaration<FocusDirective, never>;
49
- static ɵdir: i0.ɵɵDirectiveDeclaration<FocusDirective, "[ng0Focus]", ["ng0Focus"], { "focusOnLoad": { "alias": "focusOnLoad"; "required": false; }; "focusWhen": { "alias": "focusWhen"; "required": false; }; }, {}, never, never, true, never>;
50
- }
51
-
52
- declare class DigitsOnlyDirective {
53
- private elementRef;
54
- constructor(elementRef: ElementRef);
55
- private onKeyDown;
56
- static ɵfac: i0.ɵɵFactoryDeclaration<DigitsOnlyDirective, never>;
57
- static ɵdir: i0.ɵɵDirectiveDeclaration<DigitsOnlyDirective, "[iscDigitsOnly]", ["iscDigitsOnly"], {}, {}, never, never, true, never>;
58
- }
59
-
60
- declare class NumberDirective implements ControlValueAccessor {
61
- private el;
62
- private renderer;
63
- minFractionDigits: i0.InputSignal<number | undefined>;
64
- maxFractionDigits: i0.InputSignal<number | undefined>;
65
- useGrouping: i0.InputSignal<boolean>;
66
- numberType: i0.InputSignal<"decimal" | "integer">;
67
- private onChange;
68
- private onTouched;
69
- private decimalSeparator;
70
- private thousandsSeparator;
71
- private selectionStart;
72
- private selectionEnd;
73
- private isCursorInsideIntegerPart;
74
- private decimalSeparatorPosition;
75
- private value?;
76
- private setProperty;
77
- constructor(el: ElementRef<HTMLInputElement>, renderer: Renderer2);
78
- ngOnInit(): void;
79
- registerOnChange(fn: any): void;
80
- registerOnTouched(fn: any): void;
81
- setDisabledState?(isDisabled: boolean): void;
82
- writeValue(value: any): void;
83
- private onKeyDown;
84
- private onInput;
85
- private formatIntegerPart;
86
- private onBlur;
87
- private onPaste;
88
- private updateCursorInfo;
89
- private formatNumber;
90
- private isKeyAllowed;
91
- static ɵfac: i0.ɵɵFactoryDeclaration<NumberDirective, never>;
92
- static ɵdir: i0.ɵɵDirectiveDeclaration<NumberDirective, "[ng0Number]", never, { "minFractionDigits": { "alias": "minFractionDigits"; "required": false; "isSignal": true; }; "maxFractionDigits": { "alias": "maxFractionDigits"; "required": false; "isSignal": true; }; "useGrouping": { "alias": "useGrouping"; "required": false; "isSignal": true; }; "numberType": { "alias": "numberType"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
93
- }
94
-
95
- export { CustomValidatorDirective, DigitsOnlyDirective, EqualWithValidatorDirective, FocusDirective, NumberDirective, UrlValidatorDirective, ValidationModule, equalWithValidator };
127
+ export { CustomValidatorDirective, EqualWithValidatorDirective, FocusDirective, FormModule, MaxValidatorDirective, MinValidatorDirective, NumberDirective, UrlValidatorDirective, equalWithValidator };
package/http/index.d.ts CHANGED
@@ -18,10 +18,6 @@ interface HttpRequestOptions {
18
18
  * Additional data to associate with this object.
19
19
  */
20
20
  tag?: Record<string, string | number | boolean | ReadonlyArray<string | number | boolean>>;
21
- /**
22
- * HttpDataRequestResolver
23
- */
24
- dataRequestResolver?: HttpDataRequestResolver;
25
21
  /**
26
22
  * Save response in transfer state
27
23
  *
@@ -82,10 +78,45 @@ declare class HttpService {
82
78
  defaultHeaders?: HttpHeaders;
83
79
  private readonly _config;
84
80
  constructor(http: HttpClient, transferState: TransferState, injector: Injector, platformId: object);
81
+ /**
82
+ * Sends a GET request to the specified URL.
83
+ * @param url The URL to send the request to.
84
+ * @param options The options for the request.
85
+ * @returns An observable of the response.
86
+ */
85
87
  get<T>(url: string, options?: HttpRequestOptions): Observable<T>;
88
+ /**
89
+ * Sends a DataRequest to the specified URL and returns a DataResult.
90
+ * This method is used for paginated or filtered data requests.
91
+ * It uses the configured DataRequestResolver to handle the request.
92
+ * @param url The URL to send the request to.
93
+ * @param request The DataRequest object containing the request parameters.
94
+ * @param options The options for the request.
95
+ * @returns An observable of DataResult<T>.
96
+ */
86
97
  getDataResult<T>(url: string, request: DataRequest, options?: HttpRequestOptions): Observable<DataResult<T>>;
98
+ /**
99
+ * Sends a POST request to the specified URL with the given body.
100
+ * @param url The URL to send the request to.
101
+ * @param body The body of the request.
102
+ * @param options The options for the request.
103
+ * @returns An observable of the response.
104
+ */
87
105
  post<T>(url: string, body: any, options?: HttpRequestOptions): Observable<T>;
106
+ /**
107
+ * Sends a PUT request to the specified URL with the given body.
108
+ * @param url The URL to send the request to.
109
+ * @param body The body of the request.
110
+ * @param options The options for the request.
111
+ * @returns An observable of the response.
112
+ */
88
113
  put<T>(url: string, body: any, options?: HttpRequestOptions): Observable<T>;
114
+ /**
115
+ * Sends a DELETE request to the specified URL.
116
+ * @param url The URL to send the request to.
117
+ * @param options The options for the request.
118
+ * @returns An observable of the response.
119
+ */
89
120
  delete<T>(url: string, options?: HttpRequestOptions): Observable<T>;
90
121
  private _makeUrl;
91
122
  private _makeBody;
package/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- declare const LibName = "bootkit/angular-pro";
1
+ declare const libName = "bootkit/ng0";
2
2
 
3
- export { LibName };
3
+ export { libName };
@@ -0,0 +1,201 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { TemplateRef, EventEmitter, WritableSignal, QueryList } from '@angular/core';
3
+ import { SidenavMode, SidenavPosition, SidenavSize } from '@bootkit/ng0/components/sidenav';
4
+ import { CssClass } from '@bootkit/ng0/common';
5
+ import * as rxjs from 'rxjs';
6
+
7
+ /**
8
+ * Directive to define a sidenav within Layout1Component.
9
+ */
10
+ declare class Layout1SidenavDirective {
11
+ readonly template: TemplateRef<any>;
12
+ readonly open: _angular_core.InputSignalWithTransform<boolean, unknown>;
13
+ readonly mode: _angular_core.InputSignal<SidenavMode>;
14
+ readonly hasBackdrop: _angular_core.InputSignalWithTransform<boolean, unknown>;
15
+ readonly zIndex: _angular_core.InputSignal<number | undefined>;
16
+ readonly position: _angular_core.InputSignal<SidenavPosition>;
17
+ readonly size: _angular_core.InputSignal<SidenavSize>;
18
+ readonly css: _angular_core.InputSignal<CssClass>;
19
+ backdropClick: EventEmitter<PointerEvent>;
20
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<Layout1SidenavDirective, never>;
21
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<Layout1SidenavDirective, "[ng0Layout1Sidenav]", ["ng0Layout1Sidenav"], { "open": { "alias": "open"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "hasBackdrop": { "alias": "hasBackdrop"; "required": false; "isSignal": true; }; "zIndex": { "alias": "zIndex"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "css": { "alias": "css"; "required": false; "isSignal": true; }; }, { "backdropClick": "backdropClick"; }, never, never, true, never>;
22
+ }
23
+
24
+ /**
25
+ * Represents a secondary sidenav options in the Layout1Component.
26
+ */
27
+ interface Layout1SecondarySidenavOptions {
28
+ size?: SidenavSize;
29
+ zIndex?: number;
30
+ position?: SidenavPosition;
31
+ mode?: SidenavMode;
32
+ fixedInViewport?: boolean;
33
+ hasBackdrop?: boolean;
34
+ css?: CssClass;
35
+ closeOnBackdropClick?: boolean;
36
+ }
37
+ /**
38
+ * Reference to a secondary sidenav in the Layout1Component.
39
+ */
40
+ declare class Layout1SecondarySidenav {
41
+ private _disposedSubject;
42
+ private _isDisposed;
43
+ /**
44
+ * Observable that emits when the sidenav is disposed.
45
+ */
46
+ readonly disposed: rxjs.Observable<any>;
47
+ /**
48
+ * template of the sidenav content.
49
+ */
50
+ readonly template: TemplateRef<any>;
51
+ /**
52
+ * Z-Index of the sidenav.
53
+ */
54
+ readonly zIndex: WritableSignal<number | undefined>;
55
+ /**
56
+ * Sidenav css classes.
57
+ */
58
+ readonly css: WritableSignal<CssClass>;
59
+ /**
60
+ * Size of the sidenav.
61
+ */
62
+ readonly size: WritableSignal<SidenavSize>;
63
+ /**
64
+ * Position of the sidenav.
65
+ */
66
+ readonly position: WritableSignal<SidenavPosition>;
67
+ /**
68
+ * Mode of the sidenav.
69
+ */
70
+ readonly mode: WritableSignal<SidenavMode>;
71
+ /**
72
+ * Whether the sidenav has a backdrop.
73
+ */
74
+ readonly hasBackdrop: WritableSignal<boolean>;
75
+ /**
76
+ * Whether the sidenav should close on backdrop click.
77
+ */
78
+ readonly closeOnBackdropClick: WritableSignal<boolean>;
79
+ /**
80
+ * Whether the sidenav is disposed.
81
+ */
82
+ get isDisposed(): boolean;
83
+ constructor(template: TemplateRef<any>, options?: Layout1SecondarySidenavOptions);
84
+ /**
85
+ * Close and dispose the sidenav.
86
+ * @param result Optional result to emit when the sidenav is closed.
87
+ */
88
+ dispose(result?: any): void;
89
+ }
90
+
91
+ /**
92
+ * Layout1 component that provides a layout with sidenavs.
93
+ */
94
+ declare class Layout1Component {
95
+ private _zIndexCounter;
96
+ private readonly _manager;
97
+ protected readonly _sidenavs?: QueryList<Layout1SidenavDirective>;
98
+ protected readonly _secondarySidenavs: _angular_core.WritableSignal<Layout1SecondarySidenav[]>;
99
+ protected readonly _openSecondarySidenavs: Set<Layout1SecondarySidenav>;
100
+ private readonly _changeDetectorRef;
101
+ /**
102
+ * Default position for secondary sidenavs.
103
+ */
104
+ defaultSidenavPosition: _angular_core.InputSignal<SidenavPosition>;
105
+ /**
106
+ * Default size for secondary sidenavs.
107
+ */
108
+ defaultSidenavSize: _angular_core.InputSignal<SidenavSize>;
109
+ /**
110
+ * Default mode for secondary sidenavs.
111
+ */
112
+ defaultSidenavMode: _angular_core.InputSignal<SidenavMode>;
113
+ /**
114
+ * Default hasBackdrop value for secondary sidenavs.
115
+ */
116
+ defaultSidenavHasBackdrop: _angular_core.InputSignal<boolean>;
117
+ /**
118
+ * Default closeOnBackdropClick value for secondary sidenavs.
119
+ */
120
+ defaultSidenavCloseOnBackdropClick: _angular_core.InputSignal<boolean>;
121
+ constructor();
122
+ /**
123
+ * Push a secondary sidenav.
124
+ * @param template The template for the secondary sidenav.
125
+ * @param options Options for the secondary sidenav.
126
+ * @returns The reference to the pushed secondary sidenav.
127
+ */
128
+ pushSidenav(template: TemplateRef<any>, options?: Layout1SecondarySidenavOptions): Layout1SecondarySidenav;
129
+ /**
130
+ * Close the last secondary sidenav and dispose it.
131
+ * @param result The result to pass when closing the sidenav.
132
+ * @return The reference to the closed secondary sidenav.
133
+ */
134
+ popSidenav(result?: any): Layout1SecondarySidenav | undefined;
135
+ /**
136
+ * Get the list of secondary sidenavs.
137
+ */
138
+ get secondarySidenavs(): ReadonlyArray<Layout1SecondarySidenav>;
139
+ protected _onSecondarySidenavTransitionEnd(sidenav: Layout1SecondarySidenav): void;
140
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<Layout1Component, never>;
141
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<Layout1Component, "ng0-layout1", never, { "defaultSidenavPosition": { "alias": "defaultSidenavPosition"; "required": false; "isSignal": true; }; "defaultSidenavSize": { "alias": "defaultSidenavSize"; "required": false; "isSignal": true; }; "defaultSidenavMode": { "alias": "defaultSidenavMode"; "required": false; "isSignal": true; }; "defaultSidenavHasBackdrop": { "alias": "defaultSidenavHasBackdrop"; "required": false; "isSignal": true; }; "defaultSidenavCloseOnBackdropClick": { "alias": "defaultSidenavCloseOnBackdropClick"; "required": false; "isSignal": true; }; }, {}, ["_sidenavs"], ["ng0-layout1-header", "ng0-layout1-content"], true, never>;
142
+ }
143
+
144
+ /**
145
+ * Layout1 header component.
146
+ */
147
+ declare class Layout1HeaderComponent {
148
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<Layout1HeaderComponent, never>;
149
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<Layout1HeaderComponent, "ng0-layout1-header", never, {}, {}, never, ["*"], true, never>;
150
+ }
151
+
152
+ /**
153
+ * Layout1 content component.
154
+ */
155
+ declare class Layout1ContentComponent {
156
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<Layout1ContentComponent, never>;
157
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<Layout1ContentComponent, "ng0-layout1-content", never, {}, {}, never, ["*"], true, never>;
158
+ }
159
+
160
+ /**
161
+ * Layout1Module
162
+ */
163
+ declare class Layout1Module {
164
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<Layout1Module, never>;
165
+ static ɵmod: _angular_core.ɵɵNgModuleDeclaration<Layout1Module, never, [typeof Layout1Component, typeof Layout1SidenavDirective, typeof Layout1HeaderComponent, typeof Layout1ContentComponent], [typeof Layout1Component, typeof Layout1SidenavDirective, typeof Layout1HeaderComponent, typeof Layout1ContentComponent]>;
166
+ static ɵinj: _angular_core.ɵɵInjectorDeclaration<Layout1Module>;
167
+ }
168
+
169
+ /**
170
+ * Service to manage the configuration and state of Layout1Component.
171
+ */
172
+ declare class Layout1Manager {
173
+ /**
174
+ * The Layout1Component instance associated with this manager.
175
+ */
176
+ component: Layout1Component;
177
+ /**
178
+ * Push a secondary sidenav.
179
+ * @param content The template for the secondary sidenav.
180
+ * @param options Options for the secondary sidenav.
181
+ * @returns The reference to the pushed secondary sidenav.
182
+ */
183
+ pushSidenav(content: TemplateRef<any>, options?: Layout1SecondarySidenavOptions): Layout1SecondarySidenav;
184
+ /**
185
+ * Close the last secondary sidenav and dispose it.
186
+ */
187
+ popSidenav(result?: any): Layout1SecondarySidenav | undefined;
188
+ /**
189
+ * Get the list of secondary sidenavs.
190
+ */
191
+ get secondarySidenavs(): ReadonlyArray<Layout1SecondarySidenav>;
192
+ /**
193
+ * Get the last secondary sidenav.
194
+ */
195
+ get last(): Layout1SecondarySidenav | undefined;
196
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<Layout1Manager, never>;
197
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<Layout1Manager>;
198
+ }
199
+
200
+ export { Layout1Component, Layout1ContentComponent, Layout1HeaderComponent, Layout1Manager, Layout1Module, Layout1SecondarySidenav, Layout1SidenavDirective };
201
+ export type { Layout1SecondarySidenavOptions };