@bootkit/ng0 0.0.0-alpha.39 → 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.
- package/fesm2022/bootkit-ng0-common.mjs +3 -3
- package/fesm2022/bootkit-ng0-common.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-accordion.mjs +10 -10
- package/fesm2022/bootkit-ng0-components-accordion.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-backdrop.mjs +3 -3
- package/fesm2022/bootkit-ng0-components-backdrop.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-button.mjs +7 -7
- package/fesm2022/bootkit-ng0-components-button.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-card.mjs +10 -10
- package/fesm2022/bootkit-ng0-components-card.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-code.mjs +6 -6
- package/fesm2022/bootkit-ng0-components-code.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-collapse.mjs +10 -10
- package/fesm2022/bootkit-ng0-components-collapse.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-confirmation.mjs +13 -13
- package/fesm2022/bootkit-ng0-components-confirmation.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-dropdown.mjs +22 -22
- package/fesm2022/bootkit-ng0-components-dropdown.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-form-field.mjs +7 -7
- package/fesm2022/bootkit-ng0-components-form-field.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-list.mjs +10 -10
- package/fesm2022/bootkit-ng0-components-list.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-modal.mjs +7 -7
- package/fesm2022/bootkit-ng0-components-modal.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-nav.mjs +19 -19
- package/fesm2022/bootkit-ng0-components-nav.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-offcanvas.mjs +7 -7
- package/fesm2022/bootkit-ng0-components-offcanvas.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-pagination.mjs +7 -7
- package/fesm2022/bootkit-ng0-components-pagination.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-popover.mjs +6 -6
- package/fesm2022/bootkit-ng0-components-popover.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-select.mjs +7 -7
- package/fesm2022/bootkit-ng0-components-select.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-sidenav.mjs +13 -13
- package/fesm2022/bootkit-ng0-components-sidenav.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-stepper.mjs +10 -10
- package/fesm2022/bootkit-ng0-components-stepper.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-table.mjs +13 -13
- package/fesm2022/bootkit-ng0-components-table.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-toast.mjs +6 -6
- package/fesm2022/bootkit-ng0-components-toast.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-tooltip.mjs +6 -6
- package/fesm2022/bootkit-ng0-components-tooltip.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-vertical-menu.mjs +19 -19
- package/fesm2022/bootkit-ng0-components-vertical-menu.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-form.mjs +25 -25
- package/fesm2022/bootkit-ng0-form.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-http.mjs +3 -3
- package/fesm2022/bootkit-ng0-http.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-layouts-layout1.mjs +19 -19
- package/fesm2022/bootkit-ng0-layouts-layout1.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-localization.mjs +34 -34
- package/fesm2022/bootkit-ng0-localization.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-platform-browser.mjs +10 -10
- package/fesm2022/bootkit-ng0-platform-browser.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-routing.mjs +3 -3
- package/fesm2022/bootkit-ng0-routing.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-script.mjs +3 -3
- package/fesm2022/bootkit-ng0-script.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-security.mjs +13 -13
- package/fesm2022/bootkit-ng0-security.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-utils.mjs +75 -0
- package/fesm2022/bootkit-ng0-utils.mjs.map +1 -0
- package/package.json +24 -20
- package/platform/browser/index.d.ts +1 -1
- package/utils/index.d.ts +42 -0
|
@@ -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;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AAC7B,IAAA,MAAM,EAAE,CAAC,CAAS,KAAK,CAAC;IACxB,MAAM,EAAE,CAAC,CAAS,KAAK,CAAC,GAAG,CAAC;AAC5B,IAAA,OAAO,EAAE,CAAC,CAAS,KAAK,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;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bootkit/ng0",
|
|
3
|
-
"version": "0.0.0-alpha.
|
|
3
|
+
"version": "0.0.0-alpha.40",
|
|
4
4
|
"description": "Angular+Bootstrap Component Library",
|
|
5
5
|
"homepage": "https://bootkitlib.github.io/",
|
|
6
6
|
"author": "BootKit",
|
|
@@ -43,14 +43,14 @@
|
|
|
43
43
|
"types": "./data/index.d.ts",
|
|
44
44
|
"default": "./fesm2022/bootkit-ng0-data.mjs"
|
|
45
45
|
},
|
|
46
|
-
"./date": {
|
|
47
|
-
"types": "./date/index.d.ts",
|
|
48
|
-
"default": "./fesm2022/bootkit-ng0-date.mjs"
|
|
49
|
-
},
|
|
50
46
|
"./file": {
|
|
51
47
|
"types": "./file/index.d.ts",
|
|
52
48
|
"default": "./fesm2022/bootkit-ng0-file.mjs"
|
|
53
49
|
},
|
|
50
|
+
"./date": {
|
|
51
|
+
"types": "./date/index.d.ts",
|
|
52
|
+
"default": "./fesm2022/bootkit-ng0-date.mjs"
|
|
53
|
+
},
|
|
54
54
|
"./form": {
|
|
55
55
|
"types": "./form/index.d.ts",
|
|
56
56
|
"default": "./fesm2022/bootkit-ng0-form.mjs"
|
|
@@ -67,13 +67,17 @@
|
|
|
67
67
|
"types": "./routing/index.d.ts",
|
|
68
68
|
"default": "./fesm2022/bootkit-ng0-routing.mjs"
|
|
69
69
|
},
|
|
70
|
+
"./security": {
|
|
71
|
+
"types": "./security/index.d.ts",
|
|
72
|
+
"default": "./fesm2022/bootkit-ng0-security.mjs"
|
|
73
|
+
},
|
|
70
74
|
"./script": {
|
|
71
75
|
"types": "./script/index.d.ts",
|
|
72
76
|
"default": "./fesm2022/bootkit-ng0-script.mjs"
|
|
73
77
|
},
|
|
74
|
-
"./
|
|
75
|
-
"types": "./
|
|
76
|
-
"default": "./fesm2022/bootkit-ng0-
|
|
78
|
+
"./utils": {
|
|
79
|
+
"types": "./utils/index.d.ts",
|
|
80
|
+
"default": "./fesm2022/bootkit-ng0-utils.mjs"
|
|
77
81
|
},
|
|
78
82
|
"./components/accordion": {
|
|
79
83
|
"types": "./components/accordion/index.d.ts",
|
|
@@ -107,14 +111,14 @@
|
|
|
107
111
|
"types": "./components/dropdown/index.d.ts",
|
|
108
112
|
"default": "./fesm2022/bootkit-ng0-components-dropdown.mjs"
|
|
109
113
|
},
|
|
110
|
-
"./components/form-field": {
|
|
111
|
-
"types": "./components/form-field/index.d.ts",
|
|
112
|
-
"default": "./fesm2022/bootkit-ng0-components-form-field.mjs"
|
|
113
|
-
},
|
|
114
114
|
"./components/list": {
|
|
115
115
|
"types": "./components/list/index.d.ts",
|
|
116
116
|
"default": "./fesm2022/bootkit-ng0-components-list.mjs"
|
|
117
117
|
},
|
|
118
|
+
"./components/form-field": {
|
|
119
|
+
"types": "./components/form-field/index.d.ts",
|
|
120
|
+
"default": "./fesm2022/bootkit-ng0-components-form-field.mjs"
|
|
121
|
+
},
|
|
118
122
|
"./components/modal": {
|
|
119
123
|
"types": "./components/modal/index.d.ts",
|
|
120
124
|
"default": "./fesm2022/bootkit-ng0-components-modal.mjs"
|
|
@@ -123,14 +127,14 @@
|
|
|
123
127
|
"types": "./components/nav/index.d.ts",
|
|
124
128
|
"default": "./fesm2022/bootkit-ng0-components-nav.mjs"
|
|
125
129
|
},
|
|
126
|
-
"./components/offcanvas": {
|
|
127
|
-
"types": "./components/offcanvas/index.d.ts",
|
|
128
|
-
"default": "./fesm2022/bootkit-ng0-components-offcanvas.mjs"
|
|
129
|
-
},
|
|
130
130
|
"./components/overlay": {
|
|
131
131
|
"types": "./components/overlay/index.d.ts",
|
|
132
132
|
"default": "./fesm2022/bootkit-ng0-components-overlay.mjs"
|
|
133
133
|
},
|
|
134
|
+
"./components/offcanvas": {
|
|
135
|
+
"types": "./components/offcanvas/index.d.ts",
|
|
136
|
+
"default": "./fesm2022/bootkit-ng0-components-offcanvas.mjs"
|
|
137
|
+
},
|
|
134
138
|
"./components/pagination": {
|
|
135
139
|
"types": "./components/pagination/index.d.ts",
|
|
136
140
|
"default": "./fesm2022/bootkit-ng0-components-pagination.mjs"
|
|
@@ -155,14 +159,14 @@
|
|
|
155
159
|
"types": "./components/table/index.d.ts",
|
|
156
160
|
"default": "./fesm2022/bootkit-ng0-components-table.mjs"
|
|
157
161
|
},
|
|
158
|
-
"./components/toast": {
|
|
159
|
-
"types": "./components/toast/index.d.ts",
|
|
160
|
-
"default": "./fesm2022/bootkit-ng0-components-toast.mjs"
|
|
161
|
-
},
|
|
162
162
|
"./components/tooltip": {
|
|
163
163
|
"types": "./components/tooltip/index.d.ts",
|
|
164
164
|
"default": "./fesm2022/bootkit-ng0-components-tooltip.mjs"
|
|
165
165
|
},
|
|
166
|
+
"./components/toast": {
|
|
167
|
+
"types": "./components/toast/index.d.ts",
|
|
168
|
+
"default": "./fesm2022/bootkit-ng0-components-toast.mjs"
|
|
169
|
+
},
|
|
166
170
|
"./components/vertical-menu": {
|
|
167
171
|
"types": "./components/vertical-menu/index.d.ts",
|
|
168
172
|
"default": "./fesm2022/bootkit-ng0-components-vertical-menu.mjs"
|
|
@@ -61,7 +61,7 @@ declare class IntersectionObserverDirective implements OnInit, OnDestroy {
|
|
|
61
61
|
/**
|
|
62
62
|
* Whether to observe only once (true) or continuously (false).
|
|
63
63
|
* If true, the observer will disconnect after the first intersection event.
|
|
64
|
-
* @default
|
|
64
|
+
* @default true
|
|
65
65
|
*/
|
|
66
66
|
readonly once: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
67
67
|
/**
|
package/utils/index.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Easing function type definition.
|
|
5
|
+
*/
|
|
6
|
+
type EasingFn = (t: number) => number;
|
|
7
|
+
/**
|
|
8
|
+
* A counter that animates a numeric value from a start to an end value over a specified duration using an easing function.
|
|
9
|
+
*/
|
|
10
|
+
declare class Counter {
|
|
11
|
+
readonly from: number;
|
|
12
|
+
readonly to: number;
|
|
13
|
+
readonly duration: number;
|
|
14
|
+
private _subscription?;
|
|
15
|
+
readonly value: _angular_core.WritableSignal<number>;
|
|
16
|
+
readonly running: _angular_core.WritableSignal<boolean>;
|
|
17
|
+
readonly easing: EasingFn;
|
|
18
|
+
constructor(from: number, to: number, duration?: number, easing?: EasingFn, currentValue?: number);
|
|
19
|
+
/**
|
|
20
|
+
* Resets the counter and starts it.
|
|
21
|
+
* This method should be called in a browser environment.
|
|
22
|
+
* @returns void
|
|
23
|
+
*/
|
|
24
|
+
start(): void;
|
|
25
|
+
/**
|
|
26
|
+
* Stops the counter animation.
|
|
27
|
+
*/
|
|
28
|
+
stop(): void;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* A collection of common easing functions for animations.
|
|
32
|
+
*/
|
|
33
|
+
declare const easingFunctions: {
|
|
34
|
+
linear: (t: number) => number;
|
|
35
|
+
easeIn: (t: number) => number;
|
|
36
|
+
easeOut: (t: number) => number;
|
|
37
|
+
easeInOut: (t: number) => number;
|
|
38
|
+
smooth: (t: number) => number;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export { Counter, easingFunctions };
|
|
42
|
+
export type { EasingFn };
|