@mmlogic/components 0.1.0
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/README.md +221 -0
- package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
- package/dist/cjs/format-CDw-zie_.js +82 -0
- package/dist/cjs/index-OvnIRO4Y.js +1523 -0
- package/dist/cjs/index.cjs.js +32 -0
- package/dist/cjs/loader.cjs.js +13 -0
- package/dist/cjs/mosterdcomponents.cjs.js +25 -0
- package/dist/cjs/mrd-boolean-field_16.cjs.entry.js +1185 -0
- package/dist/cjs/mrd-table.cjs.entry.js +322 -0
- package/dist/cjs/quill-DmFfnC1f.js +16272 -0
- package/dist/collection/collection-manifest.json +29 -0
- package/dist/collection/components/mrd-boolean-field/mrd-boolean-field.js +199 -0
- package/dist/collection/components/mrd-boolean-field/mrd-boolean-field.scss +77 -0
- package/dist/collection/components/mrd-currency-field/mrd-currency-field.js +248 -0
- package/dist/collection/components/mrd-currency-field/mrd-currency-field.scss +100 -0
- package/dist/collection/components/mrd-date-field/mrd-date-field.js +206 -0
- package/dist/collection/components/mrd-date-field/mrd-date-field.scss +66 -0
- package/dist/collection/components/mrd-datetime-field/mrd-datetime-field.js +206 -0
- package/dist/collection/components/mrd-datetime-field/mrd-datetime-field.scss +66 -0
- package/dist/collection/components/mrd-email-field/mrd-email-field.js +230 -0
- package/dist/collection/components/mrd-email-field/mrd-email-field.scss +69 -0
- package/dist/collection/components/mrd-field/mrd-field.js +187 -0
- package/dist/collection/components/mrd-file-field/mrd-file-field.js +273 -0
- package/dist/collection/components/mrd-file-field/mrd-file-field.scss +140 -0
- package/dist/collection/components/mrd-form/mrd-form.js +245 -0
- package/dist/collection/components/mrd-form/mrd-form.scss +116 -0
- package/dist/collection/components/mrd-hyperlink-field/mrd-hyperlink-field.js +230 -0
- package/dist/collection/components/mrd-hyperlink-field/mrd-hyperlink-field.scss +69 -0
- package/dist/collection/components/mrd-image-field/mrd-image-field.js +287 -0
- package/dist/collection/components/mrd-image-field/mrd-image-field.scss +166 -0
- package/dist/collection/components/mrd-list-field/mrd-list-field.js +311 -0
- package/dist/collection/components/mrd-list-field/mrd-list-field.scss +109 -0
- package/dist/collection/components/mrd-number-field/mrd-number-field.js +316 -0
- package/dist/collection/components/mrd-number-field/mrd-number-field.scss +77 -0
- package/dist/collection/components/mrd-relation-field/mrd-relation-field.js +490 -0
- package/dist/collection/components/mrd-relation-field/mrd-relation-field.scss +266 -0
- package/dist/collection/components/mrd-table/mrd-table.js +522 -0
- package/dist/collection/components/mrd-table/mrd-table.scss +158 -0
- package/dist/collection/components/mrd-text-field/mrd-text-field.js +227 -0
- package/dist/collection/components/mrd-text-field/mrd-text-field.scss +69 -0
- package/dist/collection/components/mrd-textarea-field/mrd-textarea-field.js +267 -0
- package/dist/collection/components/mrd-textarea-field/mrd-textarea-field.scss +79 -0
- package/dist/collection/components/mrd-time-field/mrd-time-field.js +206 -0
- package/dist/collection/components/mrd-time-field/mrd-time-field.scss +66 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/types/client-layout.js +30 -0
- package/dist/collection/types/index.js +1 -0
- package/dist/collection/utils/cell-renderer.js +57 -0
- package/dist/collection/utils/format.js +72 -0
- package/dist/collection/utils/i18n.js +80 -0
- package/dist/collection/utils/validation.js +46 -0
- package/dist/components/client-layout.js +1 -0
- package/dist/components/format.js +1 -0
- package/dist/components/i18n.js +1 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +1 -0
- package/dist/components/mrd-boolean-field.d.ts +11 -0
- package/dist/components/mrd-boolean-field.js +1 -0
- package/dist/components/mrd-boolean-field2.js +1 -0
- package/dist/components/mrd-currency-field.d.ts +11 -0
- package/dist/components/mrd-currency-field.js +1 -0
- package/dist/components/mrd-currency-field2.js +1 -0
- package/dist/components/mrd-date-field.d.ts +11 -0
- package/dist/components/mrd-date-field.js +1 -0
- package/dist/components/mrd-date-field2.js +1 -0
- package/dist/components/mrd-datetime-field.d.ts +11 -0
- package/dist/components/mrd-datetime-field.js +1 -0
- package/dist/components/mrd-datetime-field2.js +1 -0
- package/dist/components/mrd-email-field.d.ts +11 -0
- package/dist/components/mrd-email-field.js +1 -0
- package/dist/components/mrd-email-field2.js +1 -0
- package/dist/components/mrd-field.d.ts +11 -0
- package/dist/components/mrd-field.js +1 -0
- package/dist/components/mrd-field2.js +1 -0
- package/dist/components/mrd-file-field.d.ts +11 -0
- package/dist/components/mrd-file-field.js +1 -0
- package/dist/components/mrd-file-field2.js +1 -0
- package/dist/components/mrd-form.d.ts +11 -0
- package/dist/components/mrd-form.js +1 -0
- package/dist/components/mrd-hyperlink-field.d.ts +11 -0
- package/dist/components/mrd-hyperlink-field.js +1 -0
- package/dist/components/mrd-hyperlink-field2.js +1 -0
- package/dist/components/mrd-image-field.d.ts +11 -0
- package/dist/components/mrd-image-field.js +1 -0
- package/dist/components/mrd-image-field2.js +1 -0
- package/dist/components/mrd-list-field.d.ts +11 -0
- package/dist/components/mrd-list-field.js +1 -0
- package/dist/components/mrd-list-field2.js +1 -0
- package/dist/components/mrd-number-field.d.ts +11 -0
- package/dist/components/mrd-number-field.js +1 -0
- package/dist/components/mrd-number-field2.js +1 -0
- package/dist/components/mrd-relation-field.d.ts +11 -0
- package/dist/components/mrd-relation-field.js +1 -0
- package/dist/components/mrd-relation-field2.js +1 -0
- package/dist/components/mrd-table.d.ts +11 -0
- package/dist/components/mrd-table.js +1 -0
- package/dist/components/mrd-text-field.d.ts +11 -0
- package/dist/components/mrd-text-field.js +1 -0
- package/dist/components/mrd-text-field2.js +1 -0
- package/dist/components/mrd-textarea-field.d.ts +11 -0
- package/dist/components/mrd-textarea-field.js +1 -0
- package/dist/components/mrd-textarea-field2.js +1 -0
- package/dist/components/mrd-time-field.d.ts +11 -0
- package/dist/components/mrd-time-field.js +1 -0
- package/dist/components/mrd-time-field2.js +1 -0
- package/dist/components/quill.js +1 -0
- package/dist/components/validation.js +1 -0
- package/dist/esm/app-globals-DQuL1Twl.js +3 -0
- package/dist/esm/format-Dt-aHxkM.js +74 -0
- package/dist/esm/index-DQ_he8te.js +1514 -0
- package/dist/esm/index.js +32 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/mosterdcomponents.js +21 -0
- package/dist/esm/mrd-boolean-field_16.entry.js +1168 -0
- package/dist/esm/mrd-table.entry.js +320 -0
- package/dist/esm/quill-CiuCgGz_.js +16266 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/mosterdcomponents/index.esm.js +1 -0
- package/dist/mosterdcomponents/mosterdcomponents.css +1 -0
- package/dist/mosterdcomponents/mosterdcomponents.esm.js +1 -0
- package/dist/mosterdcomponents/p-88cd0930.entry.js +1 -0
- package/dist/mosterdcomponents/p-926ed331.entry.js +1 -0
- package/dist/mosterdcomponents/p-CiuCgGz_.js +1 -0
- package/dist/mosterdcomponents/p-DQ_he8te.js +2 -0
- package/dist/mosterdcomponents/p-DQuL1Twl.js +1 -0
- package/dist/mosterdcomponents/p-Dt-aHxkM.js +1 -0
- package/dist/types/components/mrd-boolean-field/mrd-boolean-field.d.ts +22 -0
- package/dist/types/components/mrd-currency-field/mrd-currency-field.d.ts +26 -0
- package/dist/types/components/mrd-date-field/mrd-date-field.d.ts +21 -0
- package/dist/types/components/mrd-datetime-field/mrd-datetime-field.d.ts +21 -0
- package/dist/types/components/mrd-email-field/mrd-email-field.d.ts +22 -0
- package/dist/types/components/mrd-field/mrd-field.d.ts +23 -0
- package/dist/types/components/mrd-file-field/mrd-file-field.d.ts +30 -0
- package/dist/types/components/mrd-form/mrd-form.d.ts +24 -0
- package/dist/types/components/mrd-hyperlink-field/mrd-hyperlink-field.d.ts +22 -0
- package/dist/types/components/mrd-image-field/mrd-image-field.d.ts +31 -0
- package/dist/types/components/mrd-list-field/mrd-list-field.d.ts +28 -0
- package/dist/types/components/mrd-number-field/mrd-number-field.d.ts +29 -0
- package/dist/types/components/mrd-relation-field/mrd-relation-field.d.ts +44 -0
- package/dist/types/components/mrd-table/mrd-table.d.ts +72 -0
- package/dist/types/components/mrd-text-field/mrd-text-field.d.ts +22 -0
- package/dist/types/components/mrd-textarea-field/mrd-textarea-field.d.ts +25 -0
- package/dist/types/components/mrd-time-field/mrd-time-field.d.ts +21 -0
- package/dist/types/components.d.ts +1609 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1860 -0
- package/dist/types/types/client-layout.d.ts +76 -0
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/utils/cell-renderer.d.ts +14 -0
- package/dist/types/utils/format.d.ts +7 -0
- package/dist/types/utils/i18n.d.ts +1 -0
- package/dist/types/utils/validation.d.ts +5 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +54 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export declare enum ClientLayoutItemType {
|
|
2
|
+
FIELD = "FIELD",
|
|
3
|
+
RELATION = "RELATION",
|
|
4
|
+
SECTION = "SECTION",
|
|
5
|
+
GROUP = "GROUP"
|
|
6
|
+
}
|
|
7
|
+
export declare enum ClientLayoutItemFieldDataType {
|
|
8
|
+
TEXT = "TEXT",
|
|
9
|
+
TEXTBLOCK = "TEXTBLOCK",
|
|
10
|
+
INTEGER = "INTEGER",
|
|
11
|
+
DECIMAL = "DECIMAL",
|
|
12
|
+
PERCENTAGE = "PERCENTAGE",
|
|
13
|
+
CURRENCY = "CURRENCY",
|
|
14
|
+
BOOLEAN = "BOOLEAN",
|
|
15
|
+
DATE = "DATE",
|
|
16
|
+
DATETIME = "DATETIME",
|
|
17
|
+
TIME = "TIME",
|
|
18
|
+
EMAIL = "EMAIL",
|
|
19
|
+
HYPERLINK = "HYPERLINK",
|
|
20
|
+
LIST = "LIST",
|
|
21
|
+
FILE = "FILE",
|
|
22
|
+
IMAGE = "IMAGE"
|
|
23
|
+
}
|
|
24
|
+
export declare enum ClientLayoutItemRelationDisplayType {
|
|
25
|
+
SEARCH = "SEARCH",
|
|
26
|
+
DROPDOWN = "DROPDOWN"
|
|
27
|
+
}
|
|
28
|
+
export interface ClientListValue {
|
|
29
|
+
value: string;
|
|
30
|
+
label: string;
|
|
31
|
+
color?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface ClientLayoutItemField {
|
|
34
|
+
name: string;
|
|
35
|
+
label: string;
|
|
36
|
+
dataType: ClientLayoutItemFieldDataType;
|
|
37
|
+
required: boolean;
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
multiple?: boolean;
|
|
40
|
+
placeholder?: string;
|
|
41
|
+
listValues?: ClientListValue[];
|
|
42
|
+
accept?: string;
|
|
43
|
+
maxSize?: number;
|
|
44
|
+
decimalPrecision?: number;
|
|
45
|
+
currencyCode?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface ClientLayoutItemRelation {
|
|
48
|
+
name: string;
|
|
49
|
+
label: string;
|
|
50
|
+
relatedClass: string;
|
|
51
|
+
displayType: ClientLayoutItemRelationDisplayType;
|
|
52
|
+
required: boolean;
|
|
53
|
+
disabled?: boolean;
|
|
54
|
+
multiple?: boolean;
|
|
55
|
+
dropdownValues?: ClientListValue[];
|
|
56
|
+
}
|
|
57
|
+
export interface ClientLayoutItem {
|
|
58
|
+
type: ClientLayoutItemType;
|
|
59
|
+
field?: ClientLayoutItemField;
|
|
60
|
+
relation?: ClientLayoutItemRelation;
|
|
61
|
+
label?: string;
|
|
62
|
+
items?: ClientLayoutItem[];
|
|
63
|
+
}
|
|
64
|
+
export interface ClientLayout {
|
|
65
|
+
title?: string;
|
|
66
|
+
items: ClientLayoutItem[];
|
|
67
|
+
}
|
|
68
|
+
export interface RelationSearchResult {
|
|
69
|
+
id: string;
|
|
70
|
+
label: string;
|
|
71
|
+
description?: string;
|
|
72
|
+
}
|
|
73
|
+
export interface CurrencyValue {
|
|
74
|
+
amount: number | null;
|
|
75
|
+
currency: string;
|
|
76
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './client-layout';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface TableColumn {
|
|
2
|
+
type: 'FIELD' | 'RELATION';
|
|
3
|
+
name: string;
|
|
4
|
+
label: string;
|
|
5
|
+
dataType?: string;
|
|
6
|
+
listItems?: Array<{
|
|
7
|
+
key: string;
|
|
8
|
+
label: string;
|
|
9
|
+
}>;
|
|
10
|
+
}
|
|
11
|
+
export declare class CellRenderer {
|
|
12
|
+
static render(column: TableColumn, row: Record<string, any>, locale: string): string;
|
|
13
|
+
private static renderValue;
|
|
14
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function formatNumber(value: number, locale: string, options?: Intl.NumberFormatOptions): string;
|
|
2
|
+
export declare function formatCurrency(amount: number, currency: string, locale: string): string;
|
|
3
|
+
export declare function formatPercentage(value: number, locale: string, decimalPrecision?: number): string;
|
|
4
|
+
export declare function formatDate(value: string | Date, locale: string): string;
|
|
5
|
+
export declare function formatDateTime(value: string | Date, locale: string): string;
|
|
6
|
+
export declare function formatTime(value: string, locale: string): string;
|
|
7
|
+
export declare function parseLocalizedNumber(str: string, locale: string): number | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function t(key: string, locale: string): string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ClientLayoutItemFieldDataType } from '../types';
|
|
2
|
+
export declare function validateRequired(value: unknown): boolean;
|
|
3
|
+
export declare function validateEmail(value: string): boolean;
|
|
4
|
+
export declare function validateUrl(value: string): boolean;
|
|
5
|
+
export declare function validateNumber(value: unknown, dataType: ClientLayoutItemFieldDataType): boolean;
|
package/loader/cdn.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('../dist/cjs/loader.cjs.js');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('../dist/cjs/loader.cjs.js');
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export * from '../dist/types/components';
|
|
2
|
+
export interface CustomElementsDefineOptions {
|
|
3
|
+
exclude?: string[];
|
|
4
|
+
resourcesUrl?: string;
|
|
5
|
+
syncQueue?: boolean;
|
|
6
|
+
jmp?: (c: Function) => any;
|
|
7
|
+
raf?: (c: FrameRequestCallback) => number;
|
|
8
|
+
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
9
|
+
rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): void;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated
|
|
14
|
+
*/
|
|
15
|
+
export declare function applyPolyfills(): Promise<void>;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Used to specify a nonce value that corresponds with an application's CSP.
|
|
19
|
+
* When set, the nonce will be added to all dynamically created script and style tags at runtime.
|
|
20
|
+
* Alternatively, the nonce value can be set on a meta tag in the DOM head
|
|
21
|
+
* (<meta name="csp-nonce" content="{ nonce value here }" />) which
|
|
22
|
+
* will result in the same behavior.
|
|
23
|
+
*/
|
|
24
|
+
export declare function setNonce(nonce: string): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../dist/esm/loader.js';
|
package/loader/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(function(){if("undefined"!==typeof window&&void 0!==window.Reflect&&void 0!==window.customElements){var a=HTMLElement;window.HTMLElement=function(){return Reflect.construct(a,[],this.constructor)};HTMLElement.prototype=a.prototype;HTMLElement.prototype.constructor=HTMLElement;Object.setPrototypeOf(HTMLElement,a)}})();
|
|
2
|
+
export * from '../dist/esm/loader.js';
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mmlogic/components",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Stencil.js web component library for dynamic forms and virtual-scroll data tables",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Mosterd",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"web-components",
|
|
9
|
+
"stencil",
|
|
10
|
+
"form",
|
|
11
|
+
"table",
|
|
12
|
+
"virtual-scroll",
|
|
13
|
+
"pagination",
|
|
14
|
+
"custom-elements",
|
|
15
|
+
"angular"
|
|
16
|
+
],
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "https://bitbucket.org/rulebooks/mrd-components"
|
|
20
|
+
},
|
|
21
|
+
"main": "dist/index.cjs.js",
|
|
22
|
+
"module": "dist/index.js",
|
|
23
|
+
"es2015": "dist/esm/index.mjs",
|
|
24
|
+
"es2017": "dist/esm/index.mjs",
|
|
25
|
+
"types": "dist/types/index.d.ts",
|
|
26
|
+
"collection": "dist/collection/collection-manifest.json",
|
|
27
|
+
"collection:main": "dist/collection/index.js",
|
|
28
|
+
"unpkg": "dist/mosterd-components/mosterd-components.esm.js",
|
|
29
|
+
"files": [
|
|
30
|
+
"dist/",
|
|
31
|
+
"loader/",
|
|
32
|
+
"README.md"
|
|
33
|
+
],
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "stencil build --docs",
|
|
36
|
+
"start": "stencil build --dev --watch --serve",
|
|
37
|
+
"test": "stencil test --spec --e2e",
|
|
38
|
+
"test.watch": "stencil test --spec --e2e --watchAll",
|
|
39
|
+
"generate": "stencil generate"
|
|
40
|
+
},
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public"
|
|
43
|
+
},
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@stencil/core": "^4.22.0",
|
|
46
|
+
"quill": "^2.0.3"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@types/quill": "^2.0.14",
|
|
50
|
+
"@stencil/angular-output-target": "^1.3.0",
|
|
51
|
+
"sass": "^1.69.7",
|
|
52
|
+
"typescript": "^5.3.3"
|
|
53
|
+
}
|
|
54
|
+
}
|