@bootkit/ng0 0.0.0-alpha.3 → 0.0.0-alpha.4
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/common/index.d.ts +10 -2
- package/components/accordion/index.d.ts +1 -1
- package/components/button/index.d.ts +48 -0
- package/components/card/index.d.ts +27 -0
- package/components/code/index.d.ts +35 -0
- package/components/confirmation/index.d.ts +66 -0
- package/components/form-field/index.d.ts +3 -3
- package/components/modal/index.d.ts +1 -1
- package/components/pagination/index.d.ts +1 -1
- package/components/popover/index.d.ts +1 -1
- package/components/stepper/index.d.ts +26 -0
- package/components/table/index.d.ts +141 -0
- package/components/toast/index.d.ts +1 -1
- package/components/tooltip/index.d.ts +1 -1
- package/data/index.d.ts +72 -37
- package/fesm2022/bootkit-ng0-common.mjs +7 -1
- package/fesm2022/bootkit-ng0-common.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-button.mjs +119 -0
- package/fesm2022/bootkit-ng0-components-button.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-components-card.mjs +62 -0
- package/fesm2022/bootkit-ng0-components-card.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-components-code.mjs +70 -0
- package/fesm2022/bootkit-ng0-components-code.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-components-collapse.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-confirmation.mjs +167 -0
- package/fesm2022/bootkit-ng0-components-confirmation.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-components-form-field.mjs +1 -1
- package/fesm2022/bootkit-ng0-components-form-field.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-nav.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-pagination.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-stepper.mjs +91 -0
- package/fesm2022/bootkit-ng0-components-stepper.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-components-table.mjs +317 -0
- package/fesm2022/bootkit-ng0-components-table.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-components-toast.mjs +1 -1
- package/fesm2022/bootkit-ng0-components-toast.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-data.mjs +52 -75
- package/fesm2022/bootkit-ng0-data.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-file.mjs +50 -0
- package/fesm2022/bootkit-ng0-file.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-form.mjs +442 -0
- package/fesm2022/bootkit-ng0-form.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-http.mjs +188 -175
- package/fesm2022/bootkit-ng0-http.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-localization.mjs +1 -1
- package/fesm2022/bootkit-ng0-localization.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-script.mjs +59 -0
- package/fesm2022/bootkit-ng0-script.mjs.map +1 -0
- package/fesm2022/bootkit-ng0-security.mjs +2 -0
- package/fesm2022/bootkit-ng0-security.mjs.map +1 -1
- package/file/index.d.ts +22 -0
- package/form/index.d.ts +95 -0
- package/http/index.d.ts +107 -37
- package/localization/index.d.ts +1 -1
- package/package.json +52 -16
- package/script/index.d.ts +27 -0
- package/security/index.d.ts +3 -9
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Inject, Injectable } from '@angular/core';
|
|
3
|
+
import { DOCUMENT } from '@angular/common';
|
|
4
|
+
|
|
5
|
+
class ScriptLoader {
|
|
6
|
+
_document;
|
|
7
|
+
_renderer;
|
|
8
|
+
_loadedScripts = new Map();
|
|
9
|
+
constructor(_rendererFactory, _document) {
|
|
10
|
+
this._document = _document;
|
|
11
|
+
this._renderer = _rendererFactory.createRenderer(null, null);
|
|
12
|
+
}
|
|
13
|
+
async loadAll(...scripts) {
|
|
14
|
+
let r = [];
|
|
15
|
+
for (let s of scripts) {
|
|
16
|
+
r.push({ script: s, element: await this.load(s) });
|
|
17
|
+
}
|
|
18
|
+
return r;
|
|
19
|
+
}
|
|
20
|
+
load(script) {
|
|
21
|
+
return new Promise((resolve, reject) => {
|
|
22
|
+
let d = typeof script == 'string' ? { src: script } : script;
|
|
23
|
+
if (this._loadedScripts.has(d.src)) {
|
|
24
|
+
return resolve(this._loadedScripts.get(d.src));
|
|
25
|
+
}
|
|
26
|
+
const elm = this._renderer.createElement('script');
|
|
27
|
+
elm.type = 'text/javascript';
|
|
28
|
+
elm.src = d.src;
|
|
29
|
+
// if (Array.isArray(d.attrs)) {
|
|
30
|
+
// d.attrs.forEach(attr => {
|
|
31
|
+
// this._renderer.setAttribute(elm, attr, d.attrs[attr]);
|
|
32
|
+
// });
|
|
33
|
+
// }
|
|
34
|
+
elm.onload = (res) => {
|
|
35
|
+
this._loadedScripts.set(d.src, elm);
|
|
36
|
+
return resolve(elm);
|
|
37
|
+
};
|
|
38
|
+
this._renderer.appendChild(this._document.body, elm);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ScriptLoader, deps: [{ token: i0.RendererFactory2 }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
42
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ScriptLoader, providedIn: 'root' });
|
|
43
|
+
}
|
|
44
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ScriptLoader, decorators: [{
|
|
45
|
+
type: Injectable,
|
|
46
|
+
args: [{
|
|
47
|
+
providedIn: 'root'
|
|
48
|
+
}]
|
|
49
|
+
}], ctorParameters: () => [{ type: i0.RendererFactory2 }, { type: Document, decorators: [{
|
|
50
|
+
type: Inject,
|
|
51
|
+
args: [DOCUMENT]
|
|
52
|
+
}] }] });
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Generated bundle index. Do not edit.
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
export { ScriptLoader };
|
|
59
|
+
//# sourceMappingURL=bootkit-ng0-script.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bootkit-ng0-script.mjs","sources":["../../../projects/ng0/script/script-locader.ts","../../../projects/ng0/script/bootkit-ng0-script.ts"],"sourcesContent":["import { Renderer2, Inject, Injectable, RendererFactory2 } from '@angular/core';\r\nimport { DOCUMENT } from '@angular/common';\r\nimport { ScriptDefinition, ScriptDefinitionObject } from './types';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ScriptLoader {\r\n private _renderer: Renderer2;\r\n private _loadedScripts = new Map<string, any>();\r\n\r\n constructor(\r\n _rendererFactory: RendererFactory2,\r\n @Inject(DOCUMENT) private _document: Document,\r\n ) {\r\n this._renderer = _rendererFactory.createRenderer(null, null);\r\n }\r\n\r\n public async loadAll(...scripts: ScriptDefinition[]) {\r\n let r: { script: ScriptDefinition, element: any }[] = [];\r\n for (let s of scripts) {\r\n r.push({ script: s, element: await this.load(s) })\r\n }\r\n\r\n return r;\r\n }\r\n\r\n public load(script: ScriptDefinition): Promise<any> {\r\n return new Promise<string>((resolve, reject) => {\r\n\r\n let d: ScriptDefinitionObject = typeof script == 'string' ? { src: script } : script;\r\n\r\n if (this._loadedScripts.has(d.src)) {\r\n return resolve(this._loadedScripts.get(d.src));\r\n }\r\n\r\n const elm = this._renderer.createElement('script');\r\n elm.type = 'text/javascript';\r\n elm.src = d.src;\r\n\r\n // if (Array.isArray(d.attrs)) {\r\n // d.attrs.forEach(attr => {\r\n // this._renderer.setAttribute(elm, attr, d.attrs[attr]);\r\n // });\r\n // }\r\n\r\n elm.onload = (res: any) => {\r\n this._loadedScripts.set(d.src, elm);\r\n return resolve(elm);\r\n }\r\n\r\n this._renderer.appendChild(this._document.body, elm);\r\n });\r\n }\r\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAOa,YAAY,CAAA;AA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gBAAA,OAAO,OAAO,CAAC,GAAG,CAAC;AACrB,aAAC;AAED,YAAA,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,GAAG,CAAC;AACtD,SAAC,CAAC;;AA7CO,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,kDAMb,QAAQ,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AANP,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,cAFX,MAAM,EAAA,CAAA;;2FAEP,YAAY,EAAA,UAAA,EAAA,CAAA;kBAHxB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;0BAOI,MAAM;2BAAC,QAAQ;;;ACbpB;;AAEG;;;;"}
|
|
@@ -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/bootkit-ng0-security.ts"],"sourcesContent":["import { ClaimLike, ClaimObject } from '
|
|
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,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A,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAL9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACHD,MAAM,KAAK,GAAG;IACV,aAAa;IACb;CACH;MAMY,cAAc,CAAA;uGAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAd,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YARvB,aAAa;AACb,YAAA,kBAAkB,aADlB,aAAa;YACb,kBAAkB,CAAA,EAAA,CAAA;wGAOT,cAAc,EAAA,CAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,KAAK;AACd,oBAAA,OAAO,EAAE;AACZ,iBAAA;;;ACZD;;ACAA;;AAEG;;;;"}
|
package/file/index.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Saves a Blob as a file in the user's browser.
|
|
3
|
+
* This function is only available in browsers that support the Blob API.
|
|
4
|
+
* @param blob
|
|
5
|
+
* @param fileName
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
declare function saveBlob(blob: Blob, fileName: string): void;
|
|
9
|
+
/**
|
|
10
|
+
* Triggers downloading a file from a given URL.
|
|
11
|
+
* @param url
|
|
12
|
+
* @param fileName
|
|
13
|
+
*/
|
|
14
|
+
declare function downloadFile(url: string, fileName: string): void;
|
|
15
|
+
/**
|
|
16
|
+
* Converts a File object to a Base64 string.
|
|
17
|
+
* @param file The File object to convert.
|
|
18
|
+
* @return A Promise that resolves to the Base64 string representation of the file.
|
|
19
|
+
*/
|
|
20
|
+
declare function convertFileToBase64(file: File): Promise<string | ArrayBuffer | null>;
|
|
21
|
+
|
|
22
|
+
export { convertFileToBase64, downloadFile, saveBlob };
|
package/form/index.d.ts
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
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';
|
|
4
|
+
|
|
5
|
+
declare class EqualWithValidatorDirective implements Validator {
|
|
6
|
+
targetValue?: string;
|
|
7
|
+
inequalityMessage?: string;
|
|
8
|
+
constructor();
|
|
9
|
+
validate(control: AbstractControl): {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
} | null;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EqualWithValidatorDirective, never>;
|
|
13
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EqualWithValidatorDirective, "[ng0EqualWith]", ["ng0EqualWith"], { "targetValue": { "alias": "ng0EqualWith"; "required": false; }; "inequalityMessage": { "alias": "inequalityMessage"; "required": false; }; }, {}, never, never, true, never>;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare class UrlValidatorDirective implements Validator {
|
|
17
|
+
/** Directive is enabled or disabled */
|
|
18
|
+
iscUrl?: boolean | string;
|
|
19
|
+
validate(control: FormControl): ValidationErrors | null;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UrlValidatorDirective, never>;
|
|
21
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<UrlValidatorDirective, "input[ng0Url]", ["ng0Url"], { "iscUrl": { "alias": "iscUrl"; "required": false; }; }, {}, never, never, true, never>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare class CustomValidatorDirective implements Validator {
|
|
25
|
+
validator: i0.InputSignal<(value: any) => ValidationErrors | null>;
|
|
26
|
+
constructor();
|
|
27
|
+
validate(control: AbstractControl): ValidationErrors | null;
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CustomValidatorDirective, never>;
|
|
29
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CustomValidatorDirective, "[ng0CustomValidator]", ["ng0CustomValidator"], { "validator": { "alias": "ng0CustomValidator"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
30
|
+
}
|
|
31
|
+
|
|
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>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
declare function equalWithValidator(targetValue?: string, inequalityMessage?: string): ValidatorFn;
|
|
39
|
+
|
|
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 };
|
package/http/index.d.ts
CHANGED
|
@@ -1,66 +1,136 @@
|
|
|
1
|
-
import { HttpHeaders, HttpClient } from '@angular/common/http';
|
|
1
|
+
import { HttpParams, HttpHeaders, HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import * as i0 from '@angular/core';
|
|
4
|
-
import { InjectionToken, TransferState } from '@angular/core';
|
|
5
3
|
import { DataRequest, DataResult } from '@bootkit/ng0/data';
|
|
4
|
+
import * as i0 from '@angular/core';
|
|
5
|
+
import { TransferState, Injector, InjectionToken, Provider, EnvironmentProviders } from '@angular/core';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
interface HttpOptions {
|
|
7
|
+
interface HttpRequestOptions {
|
|
9
8
|
/** Http request ID */
|
|
10
|
-
id?:
|
|
11
|
-
|
|
9
|
+
id?: any;
|
|
10
|
+
params?: HttpParams | Record<string, string | number | boolean | ReadonlyArray<string | number | boolean>>;
|
|
11
|
+
headers?: HttpHeaders | Record<string, string | string[]>;
|
|
12
12
|
pathType?: 'relative' | 'absolute';
|
|
13
13
|
responseType?: 'json' | 'blob' | 'text';
|
|
14
14
|
contentType?: 'json' | 'multipart/form-data';
|
|
15
15
|
reportProgress?: boolean;
|
|
16
16
|
observe?: 'response' | 'body' | 'events';
|
|
17
|
+
/**
|
|
18
|
+
* Additional data to associate with this object.
|
|
19
|
+
*/
|
|
20
|
+
tag?: Record<string, string | number | boolean | ReadonlyArray<string | number | boolean>>;
|
|
21
|
+
/**
|
|
22
|
+
* HttpDataRequestResolver
|
|
23
|
+
*/
|
|
24
|
+
dataRequestResolver?: HttpDataRequestResolver;
|
|
17
25
|
/**
|
|
18
26
|
* Save response in transfer state
|
|
27
|
+
*
|
|
19
28
|
*/
|
|
20
|
-
transferState?: {
|
|
21
|
-
|
|
29
|
+
transferState?: boolean | {
|
|
30
|
+
/**
|
|
31
|
+
* Clear transfer state after first read.
|
|
32
|
+
*/
|
|
22
33
|
clearAfterUse?: boolean;
|
|
23
34
|
};
|
|
24
35
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
36
|
+
/**
|
|
37
|
+
* HttpDataRequestResolver is a function that takes a URL, a DataRequest, and options,
|
|
38
|
+
* and returns an Observable that emits a DataResult.
|
|
39
|
+
* This is used to convert a DataRequest into query parameters or request body for an HTTP request.
|
|
40
|
+
* @param url The URL to send the request to.
|
|
41
|
+
* @param dataRequest The DataRequest to convert.
|
|
42
|
+
* @param options Additional options for the request, such as headers.
|
|
43
|
+
*/
|
|
44
|
+
type HttpDataRequestResolver<T = any> = (url: string, dataRequest: DataRequest, options?: HttpRequestOptions) => Observable<DataResult<T>>;
|
|
45
|
+
interface HttpRequestEventBase {
|
|
46
|
+
type: 'Send' | 'Complete' | 'Progress' | 'Error';
|
|
47
|
+
url: string;
|
|
48
|
+
options?: HttpRequestOptions;
|
|
29
49
|
}
|
|
30
|
-
|
|
31
|
-
|
|
50
|
+
interface HttpRequestSendEvent extends HttpRequestEventBase {
|
|
51
|
+
type: 'Send';
|
|
32
52
|
}
|
|
33
|
-
|
|
34
|
-
|
|
53
|
+
interface HttpRequestCompleteEvent extends HttpRequestEventBase {
|
|
54
|
+
type: 'Complete';
|
|
55
|
+
response?: any;
|
|
35
56
|
}
|
|
36
|
-
|
|
37
|
-
|
|
57
|
+
interface HttpRequestProgressEvent extends HttpRequestEventBase {
|
|
58
|
+
type: 'Progress';
|
|
38
59
|
}
|
|
60
|
+
interface HttpRequestErrorEvent extends HttpRequestEventBase {
|
|
61
|
+
type: 'Error';
|
|
62
|
+
error: any;
|
|
63
|
+
}
|
|
64
|
+
type HttpRequestEvent = HttpRequestSendEvent | HttpRequestCompleteEvent | HttpRequestProgressEvent | HttpRequestErrorEvent;
|
|
39
65
|
|
|
66
|
+
/**
|
|
67
|
+
* HttpService provides a simple HTTP client for making requests.
|
|
68
|
+
* It supports GET, POST, PUT, DELETE methods and can handle DataRequest objects.
|
|
69
|
+
* It also supports transfer state for server-side rendering.
|
|
70
|
+
* It emits events for request lifecycle: Send, Progress, Complete and Error.
|
|
71
|
+
* It can be configured with a base URL and a default DataRequest resolver.
|
|
72
|
+
* It can also handle multipart/form-data requests.
|
|
73
|
+
*/
|
|
40
74
|
declare class HttpService {
|
|
41
|
-
private
|
|
75
|
+
private http;
|
|
42
76
|
private transferState;
|
|
77
|
+
private injector;
|
|
43
78
|
private platformId;
|
|
44
79
|
private _eventsSubject;
|
|
45
80
|
private _baseUrl?;
|
|
46
|
-
events: Observable<
|
|
81
|
+
events: Observable<HttpRequestEvent>;
|
|
47
82
|
defaultHeaders?: HttpHeaders;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
private
|
|
56
|
-
private
|
|
57
|
-
private
|
|
58
|
-
private
|
|
59
|
-
private
|
|
60
|
-
|
|
61
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<HttpService, [null, null, null, { optional: true; }]>;
|
|
83
|
+
private readonly _config;
|
|
84
|
+
constructor(http: HttpClient, transferState: TransferState, injector: Injector, platformId: object);
|
|
85
|
+
get<T>(url: string, options?: HttpRequestOptions): Observable<T>;
|
|
86
|
+
getDataResult<T>(url: string, request: DataRequest, options?: HttpRequestOptions): Observable<DataResult<T>>;
|
|
87
|
+
post<T>(url: string, body: any, options?: HttpRequestOptions): Observable<T>;
|
|
88
|
+
put<T>(url: string, body: any, options?: HttpRequestOptions): Observable<T>;
|
|
89
|
+
delete<T>(url: string, options?: HttpRequestOptions): Observable<T>;
|
|
90
|
+
private _makeUrl;
|
|
91
|
+
private _makeBody;
|
|
92
|
+
private _handleEvents;
|
|
93
|
+
private _verifyOptions;
|
|
94
|
+
private _findInTransferState;
|
|
95
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HttpService, never>;
|
|
62
96
|
static ɵprov: i0.ɵɵInjectableDeclaration<HttpService>;
|
|
63
97
|
}
|
|
64
98
|
|
|
65
|
-
|
|
66
|
-
|
|
99
|
+
declare const HTTP_SERVICE_CONFIG: InjectionToken<HttpServiceConfig>;
|
|
100
|
+
/**
|
|
101
|
+
* Configuration for the HttpService.
|
|
102
|
+
*/
|
|
103
|
+
interface HttpServiceConfig {
|
|
104
|
+
/**
|
|
105
|
+
* Base URL for the HTTP requests.
|
|
106
|
+
* This is prepended to all request URLs.
|
|
107
|
+
*/
|
|
108
|
+
baseUrl?: string;
|
|
109
|
+
/**
|
|
110
|
+
* A Resolver function to convert DataRequest to DataResult.
|
|
111
|
+
*/
|
|
112
|
+
dataRequestResolver?: HttpDataRequestResolver;
|
|
113
|
+
}
|
|
114
|
+
interface HttpServiceFeature {
|
|
115
|
+
ɵproviders: Array<Provider | EnvironmentProviders>;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Provides the configuration for the HttpService.
|
|
119
|
+
* @param config
|
|
120
|
+
* @returns
|
|
121
|
+
*/
|
|
122
|
+
declare function provideHttpService(config?: HttpServiceConfig, ...features: Partial<HttpServiceFeature>[]): EnvironmentProviders;
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Default implementation of httpDataRequestResolver1.
|
|
126
|
+
* It adds DataRequest parameters as query string to the HTTP request.
|
|
127
|
+
* @param url
|
|
128
|
+
* @param dataRequest
|
|
129
|
+
* @param options
|
|
130
|
+
* @template T data item type
|
|
131
|
+
* @returns
|
|
132
|
+
*/
|
|
133
|
+
declare function httpDataRequestResolver1<T = any>(url: string, dataRequest: DataRequest, options?: HttpRequestOptions): Observable<DataResult<T>>;
|
|
134
|
+
|
|
135
|
+
export { HTTP_SERVICE_CONFIG, HttpService, httpDataRequestResolver1, provideHttpService };
|
|
136
|
+
export type { HttpDataRequestResolver, HttpRequestCompleteEvent, HttpRequestErrorEvent, HttpRequestEvent, HttpRequestEventBase, HttpRequestOptions, HttpRequestProgressEvent, HttpRequestSendEvent, HttpServiceConfig, HttpServiceFeature };
|
package/localization/index.d.ts
CHANGED
|
@@ -154,7 +154,7 @@ declare class EnumPipe implements PipeTransform {
|
|
|
154
154
|
declare class BooleanPipe implements PipeTransform {
|
|
155
155
|
private localeProvider;
|
|
156
156
|
constructor(localeProvider: LocalizationService);
|
|
157
|
-
transform(value: any, falseKey: string, trueKey: 'false'): string;
|
|
157
|
+
transform(value: any, falseKey: string | undefined, trueKey: 'false'): string;
|
|
158
158
|
static ɵfac: i0.ɵɵFactoryDeclaration<BooleanPipe, never>;
|
|
159
159
|
static ɵpipe: i0.ɵɵPipeDeclaration<BooleanPipe, "ng0Bool", true>;
|
|
160
160
|
}
|
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.4",
|
|
4
4
|
"description": "Angular+Bootstrap Component Library",
|
|
5
5
|
"homepage": "https://bootkitlib.github.io/",
|
|
6
6
|
"author": "BootKit",
|
|
@@ -39,38 +39,66 @@
|
|
|
39
39
|
"types": "./common/index.d.ts",
|
|
40
40
|
"default": "./fesm2022/bootkit-ng0-common.mjs"
|
|
41
41
|
},
|
|
42
|
-
"./http": {
|
|
43
|
-
"types": "./http/index.d.ts",
|
|
44
|
-
"default": "./fesm2022/bootkit-ng0-http.mjs"
|
|
45
|
-
},
|
|
46
42
|
"./data": {
|
|
47
43
|
"types": "./data/index.d.ts",
|
|
48
44
|
"default": "./fesm2022/bootkit-ng0-data.mjs"
|
|
49
45
|
},
|
|
46
|
+
"./file": {
|
|
47
|
+
"types": "./file/index.d.ts",
|
|
48
|
+
"default": "./fesm2022/bootkit-ng0-file.mjs"
|
|
49
|
+
},
|
|
50
|
+
"./form": {
|
|
51
|
+
"types": "./form/index.d.ts",
|
|
52
|
+
"default": "./fesm2022/bootkit-ng0-form.mjs"
|
|
53
|
+
},
|
|
54
|
+
"./http": {
|
|
55
|
+
"types": "./http/index.d.ts",
|
|
56
|
+
"default": "./fesm2022/bootkit-ng0-http.mjs"
|
|
57
|
+
},
|
|
50
58
|
"./localization": {
|
|
51
59
|
"types": "./localization/index.d.ts",
|
|
52
60
|
"default": "./fesm2022/bootkit-ng0-localization.mjs"
|
|
53
61
|
},
|
|
62
|
+
"./script": {
|
|
63
|
+
"types": "./script/index.d.ts",
|
|
64
|
+
"default": "./fesm2022/bootkit-ng0-script.mjs"
|
|
65
|
+
},
|
|
54
66
|
"./security": {
|
|
55
67
|
"types": "./security/index.d.ts",
|
|
56
68
|
"default": "./fesm2022/bootkit-ng0-security.mjs"
|
|
57
69
|
},
|
|
58
|
-
"./components/collapse": {
|
|
59
|
-
"types": "./components/collapse/index.d.ts",
|
|
60
|
-
"default": "./fesm2022/bootkit-ng0-components-collapse.mjs"
|
|
61
|
-
},
|
|
62
70
|
"./components/accordion": {
|
|
63
71
|
"types": "./components/accordion/index.d.ts",
|
|
64
72
|
"default": "./fesm2022/bootkit-ng0-components-accordion.mjs"
|
|
65
73
|
},
|
|
66
|
-
"./components/
|
|
67
|
-
"types": "./components/
|
|
68
|
-
"default": "./fesm2022/bootkit-ng0-components-
|
|
74
|
+
"./components/button": {
|
|
75
|
+
"types": "./components/button/index.d.ts",
|
|
76
|
+
"default": "./fesm2022/bootkit-ng0-components-button.mjs"
|
|
77
|
+
},
|
|
78
|
+
"./components/code": {
|
|
79
|
+
"types": "./components/code/index.d.ts",
|
|
80
|
+
"default": "./fesm2022/bootkit-ng0-components-code.mjs"
|
|
81
|
+
},
|
|
82
|
+
"./components/card": {
|
|
83
|
+
"types": "./components/card/index.d.ts",
|
|
84
|
+
"default": "./fesm2022/bootkit-ng0-components-card.mjs"
|
|
85
|
+
},
|
|
86
|
+
"./components/collapse": {
|
|
87
|
+
"types": "./components/collapse/index.d.ts",
|
|
88
|
+
"default": "./fesm2022/bootkit-ng0-components-collapse.mjs"
|
|
89
|
+
},
|
|
90
|
+
"./components/confirmation": {
|
|
91
|
+
"types": "./components/confirmation/index.d.ts",
|
|
92
|
+
"default": "./fesm2022/bootkit-ng0-components-confirmation.mjs"
|
|
69
93
|
},
|
|
70
94
|
"./components/form-field": {
|
|
71
95
|
"types": "./components/form-field/index.d.ts",
|
|
72
96
|
"default": "./fesm2022/bootkit-ng0-components-form-field.mjs"
|
|
73
97
|
},
|
|
98
|
+
"./components/modal": {
|
|
99
|
+
"types": "./components/modal/index.d.ts",
|
|
100
|
+
"default": "./fesm2022/bootkit-ng0-components-modal.mjs"
|
|
101
|
+
},
|
|
74
102
|
"./components/nav": {
|
|
75
103
|
"types": "./components/nav/index.d.ts",
|
|
76
104
|
"default": "./fesm2022/bootkit-ng0-components-nav.mjs"
|
|
@@ -79,18 +107,26 @@
|
|
|
79
107
|
"types": "./components/offcanvas/index.d.ts",
|
|
80
108
|
"default": "./fesm2022/bootkit-ng0-components-offcanvas.mjs"
|
|
81
109
|
},
|
|
82
|
-
"./components/overlay": {
|
|
83
|
-
"types": "./components/overlay/index.d.ts",
|
|
84
|
-
"default": "./fesm2022/bootkit-ng0-components-overlay.mjs"
|
|
85
|
-
},
|
|
86
110
|
"./components/pagination": {
|
|
87
111
|
"types": "./components/pagination/index.d.ts",
|
|
88
112
|
"default": "./fesm2022/bootkit-ng0-components-pagination.mjs"
|
|
89
113
|
},
|
|
114
|
+
"./components/overlay": {
|
|
115
|
+
"types": "./components/overlay/index.d.ts",
|
|
116
|
+
"default": "./fesm2022/bootkit-ng0-components-overlay.mjs"
|
|
117
|
+
},
|
|
90
118
|
"./components/popover": {
|
|
91
119
|
"types": "./components/popover/index.d.ts",
|
|
92
120
|
"default": "./fesm2022/bootkit-ng0-components-popover.mjs"
|
|
93
121
|
},
|
|
122
|
+
"./components/stepper": {
|
|
123
|
+
"types": "./components/stepper/index.d.ts",
|
|
124
|
+
"default": "./fesm2022/bootkit-ng0-components-stepper.mjs"
|
|
125
|
+
},
|
|
126
|
+
"./components/table": {
|
|
127
|
+
"types": "./components/table/index.d.ts",
|
|
128
|
+
"default": "./fesm2022/bootkit-ng0-components-table.mjs"
|
|
129
|
+
},
|
|
94
130
|
"./components/toast": {
|
|
95
131
|
"types": "./components/toast/index.d.ts",
|
|
96
132
|
"default": "./fesm2022/bootkit-ng0-components-toast.mjs"
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { RendererFactory2 } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
interface ScriptDefinitionObject {
|
|
5
|
+
/** Script URL */
|
|
6
|
+
src: string;
|
|
7
|
+
attrs?: {
|
|
8
|
+
[key: string]: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
type ScriptDefinition = string | ScriptDefinitionObject;
|
|
12
|
+
|
|
13
|
+
declare class ScriptLoader {
|
|
14
|
+
private _document;
|
|
15
|
+
private _renderer;
|
|
16
|
+
private _loadedScripts;
|
|
17
|
+
constructor(_rendererFactory: RendererFactory2, _document: Document);
|
|
18
|
+
loadAll(...scripts: ScriptDefinition[]): Promise<{
|
|
19
|
+
script: ScriptDefinition;
|
|
20
|
+
element: any;
|
|
21
|
+
}[]>;
|
|
22
|
+
load(script: ScriptDefinition): Promise<any>;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ScriptLoader, never>;
|
|
24
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ScriptLoader>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { ScriptLoader };
|
package/security/index.d.ts
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
|
+
import { ClaimLike } from '@bootkit/ng0/common';
|
|
1
2
|
import * as i0 from '@angular/core';
|
|
2
3
|
import { TemplateRef, ViewContainerRef } from '@angular/core';
|
|
3
4
|
|
|
4
|
-
interface ClaimObject {
|
|
5
|
-
all?: string[];
|
|
6
|
-
any?: string[];
|
|
7
|
-
}
|
|
8
|
-
type ClaimLike = string | ClaimObject;
|
|
9
|
-
|
|
10
5
|
/** User */
|
|
11
6
|
declare class User {
|
|
12
7
|
readonly claims: string[];
|
|
@@ -17,14 +12,14 @@ declare class User {
|
|
|
17
12
|
}
|
|
18
13
|
|
|
19
14
|
declare class UserStore<U extends User = User> {
|
|
20
|
-
readonly user: i0.WritableSignal<U>;
|
|
15
|
+
readonly user: i0.WritableSignal<U | null | undefined>;
|
|
21
16
|
constructor();
|
|
22
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<UserStore<any>, never>;
|
|
23
18
|
static ɵprov: i0.ɵɵInjectableDeclaration<UserStore<any>>;
|
|
24
19
|
}
|
|
25
20
|
|
|
26
21
|
declare class UserDirective {
|
|
27
|
-
claim: i0.InputSignal<ClaimLike>;
|
|
22
|
+
claim: i0.InputSignal<ClaimLike | null | undefined>;
|
|
28
23
|
private _viewCreated;
|
|
29
24
|
constructor(templateRef: TemplateRef<any>, viewContainer: ViewContainerRef, userStore: UserStore);
|
|
30
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<UserDirective, never>;
|
|
@@ -45,4 +40,3 @@ declare class SecurityModule {
|
|
|
45
40
|
}
|
|
46
41
|
|
|
47
42
|
export { GuestUserDirective, SecurityModule, User, UserDirective, UserStore };
|
|
48
|
-
export type { ClaimLike, ClaimObject };
|