@universityofmaryland/web-model-library 1.0.7 → 1.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/LICENSE +5 -0
- package/README.md +1 -1
- package/dist/_types.d.ts +43 -0
- package/dist/_types.d.ts.map +1 -1
- package/dist/_virtual/index.js +1 -1
- package/dist/_virtual/postcss.js +1 -1
- package/dist/attributes/change-detection.d.ts +21 -0
- package/dist/attributes/change-detection.d.ts.map +1 -0
- package/dist/attributes/change-detection.js +60 -0
- package/dist/attributes/change-detection.js.map +1 -0
- package/dist/attributes/checks.d.ts.map +1 -1
- package/dist/attributes/checks.js +15 -8
- package/dist/attributes/checks.js.map +1 -1
- package/dist/attributes/config.d.ts +29 -0
- package/dist/attributes/config.d.ts.map +1 -0
- package/dist/attributes/config.js +57 -0
- package/dist/attributes/config.js.map +1 -0
- package/dist/attributes/converters.d.ts +14 -0
- package/dist/attributes/converters.d.ts.map +1 -0
- package/dist/attributes/converters.js +84 -0
- package/dist/attributes/converters.js.map +1 -0
- package/dist/attributes/errors.d.ts +16 -0
- package/dist/attributes/errors.d.ts.map +1 -0
- package/dist/attributes/errors.js +51 -0
- package/dist/attributes/errors.js.map +1 -0
- package/dist/attributes/index.d.ts +4 -0
- package/dist/attributes/index.d.ts.map +1 -1
- package/dist/attributes.js +18 -0
- package/dist/attributes.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/model/controllers.d.ts +22 -0
- package/dist/model/controllers.d.ts.map +1 -0
- package/dist/model/controllers.js +53 -0
- package/dist/model/controllers.js.map +1 -0
- package/dist/model/errors.d.ts +13 -0
- package/dist/model/errors.d.ts.map +1 -0
- package/dist/model/errors.js +23 -0
- package/dist/model/errors.js.map +1 -0
- package/dist/model/index.d.ts +54 -3
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/registration.d.ts +13 -0
- package/dist/model/registration.d.ts.map +1 -0
- package/dist/model/registration.js +83 -0
- package/dist/model/registration.js.map +1 -0
- package/dist/model/update-cycle.d.ts +12 -0
- package/dist/model/update-cycle.d.ts.map +1 -0
- package/dist/model/update-cycle.js +41 -0
- package/dist/model/update-cycle.js.map +1 -0
- package/dist/model.js +335 -55
- package/dist/model.js.map +1 -1
- package/dist/node_modules/.pnpm/nanoid@3.3.11/node_modules/nanoid/non-secure/index.js.map +1 -0
- package/dist/node_modules/{picocolors → .pnpm/picocolors@1.1.1/node_modules/picocolors}/picocolors.browser.js +1 -1
- package/dist/node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.browser.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss-discard-duplicates@5.1.0_postcss@8.5.8/node_modules/postcss-discard-duplicates/src/index.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/at-rule.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/comment.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/container.js.map +1 -0
- package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/css-syntax-error.js +2 -2
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/css-syntax-error.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/declaration.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/document.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/fromJSON.js.map +1 -0
- package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/input.js +2 -2
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/input.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/lazy-result.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/list.js.map +1 -0
- package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/map-generator.js +1 -1
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/map-generator.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/no-work-result.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/node.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/parse.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/parser.js.map +1 -0
- package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/postcss.js +1 -1
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/postcss.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/postcss2.js.map +1 -0
- package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/previous-map.js +1 -1
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/previous-map.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/processor.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/result.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/root.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/rule.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/stringifier.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/stringify.js.map +1 -0
- package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/symbols.js +1 -1
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/symbols.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/tokenize.js.map +1 -0
- package/dist/node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/warning.js.map +1 -0
- package/dist/slots/index.d.ts +6 -0
- package/dist/slots/index.d.ts.map +1 -1
- package/dist/slots/slot-events.d.ts +32 -0
- package/dist/slots/slot-events.d.ts.map +1 -0
- package/dist/slots/slot-events.js +83 -0
- package/dist/slots/slot-events.js.map +1 -0
- package/dist/slots/slot-query.d.ts +18 -0
- package/dist/slots/slot-query.d.ts.map +1 -0
- package/dist/slots/slot-query.js +59 -0
- package/dist/slots/slot-query.js.map +1 -0
- package/dist/slots/slot-validation.d.ts +5 -0
- package/dist/slots/slot-validation.d.ts.map +1 -0
- package/dist/slots/slot-validation.js +89 -0
- package/dist/slots/slot-validation.js.map +1 -0
- package/dist/slots.js +15 -1
- package/dist/slots.js.map +1 -1
- package/dist/testing/console.d.ts +8 -0
- package/dist/testing/console.d.ts.map +1 -0
- package/dist/testing/console.js +39 -0
- package/dist/testing/console.js.map +1 -0
- package/dist/testing/events.d.ts +11 -0
- package/dist/testing/events.d.ts.map +1 -0
- package/dist/testing/events.js +47 -0
- package/dist/testing/events.js.map +1 -0
- package/dist/testing/fixture.d.ts +10 -0
- package/dist/testing/fixture.d.ts.map +1 -0
- package/dist/testing/fixture.js +36 -0
- package/dist/testing/fixture.js.map +1 -0
- package/dist/testing/index.d.ts +8 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/shadow.d.ts +6 -0
- package/dist/testing/shadow.d.ts.map +1 -0
- package/dist/testing/shadow.js +27 -0
- package/dist/testing/shadow.js.map +1 -0
- package/dist/testing/slots.d.ts +10 -0
- package/dist/testing/slots.d.ts.map +1 -0
- package/dist/testing/slots.js +62 -0
- package/dist/testing/slots.js.map +1 -0
- package/dist/testing.d.ts +2 -0
- package/dist/testing.js +26 -0
- package/dist/testing.js.map +1 -0
- package/dist/utilities/debug.d.ts +365 -0
- package/dist/utilities/debug.d.ts.map +1 -0
- package/dist/utilities/debug.js +71 -0
- package/dist/utilities/debug.js.map +1 -0
- package/dist/utilities/dom.d.ts +11 -0
- package/dist/utilities/dom.d.ts.map +1 -0
- package/dist/utilities/dom.js +57 -0
- package/dist/utilities/dom.js.map +1 -0
- package/dist/utilities/events.d.ts +22 -0
- package/dist/utilities/events.d.ts.map +1 -0
- package/dist/utilities/events.js +49 -0
- package/dist/utilities/events.js.map +1 -0
- package/dist/utilities/index.d.ts +7 -0
- package/dist/utilities/index.d.ts.map +1 -1
- package/dist/utilities/register.d.ts.map +1 -1
- package/dist/utilities/register.js +16 -4
- package/dist/utilities/register.js.map +1 -1
- package/dist/utilities/styles.js +1 -1
- package/dist/utilities/types.d.ts +10 -0
- package/dist/utilities/types.d.ts.map +1 -0
- package/dist/utilities/types.js +45 -0
- package/dist/utilities/types.js.map +1 -0
- package/dist/utilities.js +27 -1
- package/dist/utilities.js.map +1 -1
- package/package.json +21 -15
- package/dist/node_modules/nanoid/non-secure/index.js.map +0 -1
- package/dist/node_modules/picocolors/picocolors.browser.js.map +0 -1
- package/dist/node_modules/postcss/lib/at-rule.js.map +0 -1
- package/dist/node_modules/postcss/lib/comment.js.map +0 -1
- package/dist/node_modules/postcss/lib/container.js.map +0 -1
- package/dist/node_modules/postcss/lib/css-syntax-error.js.map +0 -1
- package/dist/node_modules/postcss/lib/declaration.js.map +0 -1
- package/dist/node_modules/postcss/lib/document.js.map +0 -1
- package/dist/node_modules/postcss/lib/fromJSON.js.map +0 -1
- package/dist/node_modules/postcss/lib/input.js.map +0 -1
- package/dist/node_modules/postcss/lib/lazy-result.js.map +0 -1
- package/dist/node_modules/postcss/lib/list.js.map +0 -1
- package/dist/node_modules/postcss/lib/map-generator.js.map +0 -1
- package/dist/node_modules/postcss/lib/no-work-result.js.map +0 -1
- package/dist/node_modules/postcss/lib/node.js.map +0 -1
- package/dist/node_modules/postcss/lib/parse.js.map +0 -1
- package/dist/node_modules/postcss/lib/parser.js.map +0 -1
- package/dist/node_modules/postcss/lib/postcss.js.map +0 -1
- package/dist/node_modules/postcss/lib/postcss2.js.map +0 -1
- package/dist/node_modules/postcss/lib/previous-map.js.map +0 -1
- package/dist/node_modules/postcss/lib/processor.js.map +0 -1
- package/dist/node_modules/postcss/lib/result.js.map +0 -1
- package/dist/node_modules/postcss/lib/root.js.map +0 -1
- package/dist/node_modules/postcss/lib/rule.js.map +0 -1
- package/dist/node_modules/postcss/lib/stringifier.js.map +0 -1
- package/dist/node_modules/postcss/lib/stringify.js.map +0 -1
- package/dist/node_modules/postcss/lib/symbols.js.map +0 -1
- package/dist/node_modules/postcss/lib/tokenize.js.map +0 -1
- package/dist/node_modules/postcss/lib/warning.js.map +0 -1
- package/dist/packages/model/node_modules/postcss-discard-duplicates/src/index.js.map +0 -1
- /package/dist/node_modules/{nanoid → .pnpm/nanoid@3.3.11/node_modules/nanoid}/non-secure/index.js +0 -0
- /package/dist/{packages/model → node_modules/.pnpm/postcss-discard-duplicates@5.1.0_postcss@8.5.8}/node_modules/postcss-discard-duplicates/src/index.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/at-rule.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/comment.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/container.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/declaration.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/document.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/fromJSON.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/lazy-result.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/list.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/no-work-result.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/node.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/parse.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/parser.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/postcss2.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/processor.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/result.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/root.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/rule.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/stringifier.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/stringify.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/tokenize.js +0 -0
- /package/dist/node_modules/{postcss → .pnpm/postcss@8.5.8/node_modules/postcss}/lib/warning.js +0 -0
package/LICENSE
ADDED
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @universityofmaryland/web-model-library
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/@universityofmaryland/web-model-library)
|
|
4
4
|
|
|
5
5
|
Core utilities for building web components in the UMD design system. Provides the foundational tools for attribute handling, slot management, component registration, and custom element creation.
|
|
6
6
|
|
package/dist/_types.d.ts
CHANGED
|
@@ -25,8 +25,23 @@ export interface SlotConfig {
|
|
|
25
25
|
allowedElements?: string[];
|
|
26
26
|
deprecated?: string;
|
|
27
27
|
replacement?: string;
|
|
28
|
+
disallowedElements?: string[];
|
|
29
|
+
validate?: (elements: Element[]) => boolean | string;
|
|
30
|
+
minItems?: number;
|
|
31
|
+
maxItems?: number;
|
|
28
32
|
}
|
|
29
33
|
export type SlotConfiguration = Record<string, SlotConfig>;
|
|
34
|
+
export type SlotErrorType = 'missing' | 'deprecated' | 'invalid-elements' | 'disallowed-elements' | 'min-items' | 'max-items' | 'custom-validation';
|
|
35
|
+
export interface SlotValidationError {
|
|
36
|
+
slot: string;
|
|
37
|
+
error: SlotErrorType;
|
|
38
|
+
message: string;
|
|
39
|
+
invalidElements?: Element[];
|
|
40
|
+
}
|
|
41
|
+
export interface SlotValidationResult {
|
|
42
|
+
isValid: boolean;
|
|
43
|
+
errors: SlotValidationError[];
|
|
44
|
+
}
|
|
30
45
|
export interface ComponentEventDetail {
|
|
31
46
|
tagName: string;
|
|
32
47
|
element: HTMLElement;
|
|
@@ -59,6 +74,21 @@ export interface ComponentConfiguration {
|
|
|
59
74
|
slots?: SlotConfiguration;
|
|
60
75
|
createComponent: CreateComponentFunction;
|
|
61
76
|
attributes?: any | any[];
|
|
77
|
+
reactiveAttributes?: Record<string, {
|
|
78
|
+
attribute?: string | false;
|
|
79
|
+
type?: 'string' | 'number' | 'boolean' | 'object' | 'array';
|
|
80
|
+
reflect?: boolean;
|
|
81
|
+
converter?: {
|
|
82
|
+
fromAttribute: (value: string | null, name: string) => unknown;
|
|
83
|
+
toAttribute: (value: unknown) => string | null;
|
|
84
|
+
};
|
|
85
|
+
defaultValue?: unknown;
|
|
86
|
+
validate?: (value: unknown) => string | void;
|
|
87
|
+
onChange?: (host: HTMLElement, newValue: unknown, oldValue: unknown) => void;
|
|
88
|
+
hasChanged?: (newValue: unknown, oldValue: unknown) => boolean;
|
|
89
|
+
}>;
|
|
90
|
+
firstConnected?: (host: HTMLElement, shadow: ShadowRoot) => void;
|
|
91
|
+
willFirstUpdate?: (host: HTMLElement, shadow: ShadowRoot) => void;
|
|
62
92
|
beforeConnect?: (ref: ComponentRef, shadow: ShadowRoot) => void;
|
|
63
93
|
afterConnect?: (ref: ComponentRef, shadow?: ShadowRoot) => void;
|
|
64
94
|
onReady?: (ref: ComponentRef) => void;
|
|
@@ -74,4 +104,17 @@ export interface AttributeElementRef {
|
|
|
74
104
|
[key: string]: any;
|
|
75
105
|
};
|
|
76
106
|
}
|
|
107
|
+
export type PropertyValues<T = any> = Map<keyof T & string, unknown>;
|
|
108
|
+
export interface ReactiveController {
|
|
109
|
+
hostConnected?(): void;
|
|
110
|
+
hostDisconnected?(): void;
|
|
111
|
+
hostUpdate?(): void;
|
|
112
|
+
hostUpdated?(): void;
|
|
113
|
+
}
|
|
114
|
+
export interface ReactiveControllerHost extends HTMLElement {
|
|
115
|
+
addController(controller: ReactiveController): void;
|
|
116
|
+
removeController(controller: ReactiveController): void;
|
|
117
|
+
requestUpdate(name?: string, oldValue?: unknown): void;
|
|
118
|
+
readonly updateComplete: Promise<boolean>;
|
|
119
|
+
}
|
|
77
120
|
//# sourceMappingURL=_types.d.ts.map
|
package/dist/_types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_types.d.ts","sourceRoot":"","sources":["../source/_types.ts"],"names":[],"mappings":"AAqBA,MAAM,WAAW,UAAU;IAEzB,OAAO,EAAE,WAAW,GAAG,gBAAgB,CAAC;IAExC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,MAAM,CAAC,EAAE;QACP,IAAI,CAAC,EAAE,MAAM,IAAI,CAAC;QAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;QACrB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;QACzB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;QACpB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;CACH;AAMD,MAAM,WAAW,YAAY;IAE3B,OAAO,EAAE,WAAW,GAAG,gBAAgB,CAAC;IAExC,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gB,CAAC,IAAI,IAAI,CAAC;IAC1B,UAAU,CAAC,IAAI,IAAI,CAAC;IACpB,WAAW,CAAC,IAAI,IAAI,CAAC;CACtB;AAMD,MAAM,WAAW,sBAAuB,SAAQ,WAAW;IACzD,aAAa,CAAC,UAAU,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACpD,gBAAgB,CAAC,UAAU,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACvD,aAAa,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACvD,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;CAC3C"}
|
package/dist/_virtual/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getDefaultExportFromCjs } from "./_commonjsHelpers.js";
|
|
2
|
-
import { __require as requireSrc } from "../
|
|
2
|
+
import { __require as requireSrc } from "../node_modules/.pnpm/postcss-discard-duplicates@5.1.0_postcss@8.5.8/node_modules/postcss-discard-duplicates/src/index.js";
|
|
3
3
|
var srcExports = requireSrc();
|
|
4
4
|
const postcssDuplicates = /* @__PURE__ */ getDefaultExportFromCjs(srcExports);
|
|
5
5
|
export {
|
package/dist/_virtual/postcss.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getDefaultExportFromCjs } from "./_commonjsHelpers.js";
|
|
2
|
-
import { __require as requirePostcss } from "../node_modules/postcss/lib/postcss2.js";
|
|
2
|
+
import { __require as requirePostcss } from "../node_modules/.pnpm/postcss@8.5.8/node_modules/postcss/lib/postcss2.js";
|
|
3
3
|
var postcssExports = requirePostcss();
|
|
4
4
|
const postcss = /* @__PURE__ */ getDefaultExportFromCjs(postcssExports);
|
|
5
5
|
export {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare function defaultEquality(a: unknown, b: unknown): boolean;
|
|
2
|
+
export declare function jsonEquality(a: unknown, b: unknown): boolean;
|
|
3
|
+
export type EqualityFn = (a: unknown, b: unknown) => boolean;
|
|
4
|
+
export declare class ChangeDetector {
|
|
5
|
+
private values;
|
|
6
|
+
private equalityFn;
|
|
7
|
+
constructor(equalityFn?: EqualityFn);
|
|
8
|
+
set(key: string, value: unknown, equalityFn?: EqualityFn): boolean;
|
|
9
|
+
get(key: string): unknown;
|
|
10
|
+
has(key: string): boolean;
|
|
11
|
+
reset(): void;
|
|
12
|
+
}
|
|
13
|
+
export declare const ChangeDetectors: {
|
|
14
|
+
readonly always: (_newVal: unknown, _oldVal: unknown) => boolean;
|
|
15
|
+
readonly never: (_newVal: unknown, _oldVal: unknown) => boolean;
|
|
16
|
+
readonly deep: (newVal: unknown, oldVal: unknown) => boolean;
|
|
17
|
+
readonly shallow: (newVal: unknown, oldVal: unknown) => boolean;
|
|
18
|
+
readonly threshold: (epsilon: number) => (newVal: unknown, oldVal: unknown) => boolean;
|
|
19
|
+
};
|
|
20
|
+
export type HasChangedFn = (newValue: unknown, oldValue: unknown) => boolean;
|
|
21
|
+
//# sourceMappingURL=change-detection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"change-detection.d.ts","sourceRoot":"","sources":["../../source/attributes/change-detection.ts"],"names":[],"mappings":"AAQA,wBAAgB,eAAe,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,OAAO,CAE/D;AAGD,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,OAAO,CAE5D;AAED,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC;AAE7D,qBAAa,cAAc;IACzB,OAAO,CAAC,MAAM,CAA8B;IAC5C,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,GAAE,UAA4B;IAKpD,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,UAAU,GAAG,OAAO;IAUlE,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAIzB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAIzB,KAAK,IAAI,IAAI;CAGd;AAiBD,eAAO,MAAM,eAAe;+BAER,OAAO,WAAW,OAAO,KAAG,OAAO;8BAGpC,OAAO,WAAW,OAAO,KAAG,OAAO;4BAGrC,OAAO,UAAU,OAAO,KAAG,OAAO;+BAI/B,OAAO,UAAU,OAAO,KAAG,OAAO;kCAKxC,MAAM,cACP,OAAO,UAAU,OAAO,KAAG,OAAO;CAErC,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,KAAK,OAAO,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
function defaultEquality(a, b) {
|
|
2
|
+
return Object.is(a, b);
|
|
3
|
+
}
|
|
4
|
+
function jsonEquality(a, b) {
|
|
5
|
+
return JSON.stringify(a) === JSON.stringify(b);
|
|
6
|
+
}
|
|
7
|
+
class ChangeDetector {
|
|
8
|
+
constructor(equalityFn = defaultEquality) {
|
|
9
|
+
this.values = /* @__PURE__ */ new Map();
|
|
10
|
+
this.equalityFn = equalityFn;
|
|
11
|
+
}
|
|
12
|
+
/** Returns `true` if the value changed. */
|
|
13
|
+
set(key, value, equalityFn) {
|
|
14
|
+
const prev = this.values.get(key);
|
|
15
|
+
const eq = equalityFn ?? this.equalityFn;
|
|
16
|
+
if (this.values.has(key) && eq(prev, value)) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
this.values.set(key, value);
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
get(key) {
|
|
23
|
+
return this.values.get(key);
|
|
24
|
+
}
|
|
25
|
+
has(key) {
|
|
26
|
+
return this.values.has(key);
|
|
27
|
+
}
|
|
28
|
+
reset() {
|
|
29
|
+
this.values.clear();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function shallowEqual(a, b) {
|
|
33
|
+
if (Object.is(a, b)) return true;
|
|
34
|
+
if (typeof a !== "object" || typeof b !== "object" || a === null || b === null) return false;
|
|
35
|
+
const keysA = Object.keys(a);
|
|
36
|
+
const keysB = Object.keys(b);
|
|
37
|
+
if (keysA.length !== keysB.length) return false;
|
|
38
|
+
return keysA.every(
|
|
39
|
+
(key) => Object.is(a[key], b[key])
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
const ChangeDetectors = {
|
|
43
|
+
/** Always changed — update on every set. */
|
|
44
|
+
always: (_newVal, _oldVal) => true,
|
|
45
|
+
/** Never changed — manual updates only. */
|
|
46
|
+
never: (_newVal, _oldVal) => false,
|
|
47
|
+
/** Deep structural comparison via JSON serialization. */
|
|
48
|
+
deep: (newVal, oldVal) => JSON.stringify(newVal) !== JSON.stringify(oldVal),
|
|
49
|
+
/** Shallow object comparison — compares own enumerable properties by reference. */
|
|
50
|
+
shallow: (newVal, oldVal) => !shallowEqual(newVal, oldVal),
|
|
51
|
+
/** Number threshold — only changed if difference exceeds epsilon. */
|
|
52
|
+
threshold: (epsilon) => (newVal, oldVal) => Math.abs(newVal - oldVal) > epsilon
|
|
53
|
+
};
|
|
54
|
+
export {
|
|
55
|
+
ChangeDetector,
|
|
56
|
+
ChangeDetectors,
|
|
57
|
+
defaultEquality,
|
|
58
|
+
jsonEquality
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=change-detection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"change-detection.js","sources":["../../source/attributes/change-detection.ts"],"sourcesContent":["/**\n * Dirty-checking utilities for reactive attribute properties.\n *\n * Provides equality functions and a `ChangeDetector` class that\n * tracks per-property values and reports whether a set actually changed.\n */\n\n/** Strict equality via `Object.is` — handles NaN correctly. */\nexport function defaultEquality(a: unknown, b: unknown): boolean {\n return Object.is(a, b);\n}\n\n/** Deep-ish equality via JSON serialisation. Suitable for plain objects/arrays. */\nexport function jsonEquality(a: unknown, b: unknown): boolean {\n return JSON.stringify(a) === JSON.stringify(b);\n}\n\nexport type EqualityFn = (a: unknown, b: unknown) => boolean;\n\nexport class ChangeDetector {\n private values = new Map<string, unknown>();\n private equalityFn: EqualityFn;\n\n constructor(equalityFn: EqualityFn = defaultEquality) {\n this.equalityFn = equalityFn;\n }\n\n /** Returns `true` if the value changed. */\n set(key: string, value: unknown, equalityFn?: EqualityFn): boolean {\n const prev = this.values.get(key);\n const eq = equalityFn ?? this.equalityFn;\n if (this.values.has(key) && eq(prev, value)) {\n return false;\n }\n this.values.set(key, value);\n return true;\n }\n\n get(key: string): unknown {\n return this.values.get(key);\n }\n\n has(key: string): boolean {\n return this.values.has(key);\n }\n\n reset(): void {\n this.values.clear();\n }\n}\n\nfunction shallowEqual(a: unknown, b: unknown): boolean {\n if (Object.is(a, b)) return true;\n if (typeof a !== 'object' || typeof b !== 'object' || a === null || b === null) return false;\n const keysA = Object.keys(a as object);\n const keysB = Object.keys(b as object);\n if (keysA.length !== keysB.length) return false;\n return keysA.every((key) =>\n Object.is((a as Record<string, unknown>)[key], (b as Record<string, unknown>)[key]),\n );\n}\n\n/**\n * Pre-built `hasChanged` functions for use with `ReactiveAttributeConfig.hasChanged`.\n * Each returns `true` when the value has changed and an update should fire.\n */\nexport const ChangeDetectors = {\n /** Always changed — update on every set. */\n always: (_newVal: unknown, _oldVal: unknown): boolean => true,\n\n /** Never changed — manual updates only. */\n never: (_newVal: unknown, _oldVal: unknown): boolean => false,\n\n /** Deep structural comparison via JSON serialization. */\n deep: (newVal: unknown, oldVal: unknown): boolean =>\n JSON.stringify(newVal) !== JSON.stringify(oldVal),\n\n /** Shallow object comparison — compares own enumerable properties by reference. */\n shallow: (newVal: unknown, oldVal: unknown): boolean =>\n !shallowEqual(newVal, oldVal),\n\n /** Number threshold — only changed if difference exceeds epsilon. */\n threshold:\n (epsilon: number) =>\n (newVal: unknown, oldVal: unknown): boolean =>\n Math.abs((newV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A;AAEtF;AAMO,MAAM,kBAAkB;AAAA;AAAA,EAE7B,QAAQ,CAAC,SAAkB,YAA8B;AAAA;AAAA,EAGzD,OAAO,CAAC,SAAkB,YAA8B;AAAA;AAAA,EAGxD,MAAM,CAAC,QAAiB,WACtB,KAAK,UAAU,MAAM,MAAM,KAAK,UAAU,MAAM;AAAA;AAAA,EAGlD,SAAS,CAAC,QAAiB,WACzB,CAAC,aAAa,QAAQ,MAAM;AAAA;AAAA,EAG9B,WACE,CAAC,YACD,CAAC,QAAiB,WAChB,KAAK,IAAK,SAAqB,MAAiB,IAAI;AAC1D;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checks.d.ts","sourceRoot":"","sources":["../../source/attributes/checks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"checks.d.ts","sourceRoot":"","sources":["../../source/attributes/checks.ts"],"names":[],"mappings":"AAkCA,UAAU,qBAAqB;IAE7B,OAAO,EAAE,WAAW,CAAC;IAErB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,UAAU,cAAe,SAAQ,qBAAqB;IACpD,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,KAAK,kBAAkB,GAAG,IAAI,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;AAEjE,UAAU,wBAAyB,SAAQ,qBAAqB;IAC9D,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;CACxB;AA2HD,QAAA,MAAM,OAAO;mBACI,qBAAqB;oBAKpB,qBAAqB;CAKtC,CAAC;AAGF,QAAA,MAAM,aAAa;kBACH,qBAAqB,KAAG,OAAO;CAW9C,CAAC;AAGF,QAAA,MAAM,eAAe;gCAjEX,qBAAqB,KAAG,OAAO;kCAA/B,qBAAqB,KAAG,OAAO;uCAA/B,qBAAqB,KAAG,OAAO;iCAA/B,qBAAqB,KAAG,O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qB,KAAG,MAAM,GAAG,IAAI;0CAArC,qBAAqB,KAAG,MAAM,GAAG,IAAI;sCAArC,qBAAqB,KAAG,MAAM,GAAG,IAAI;oCAArC,qBAAqB,KAAG,MAAM,GAAG,IAAI;+BAArC,qBAAqB,KAAG,MAAM,GAAG,IAAI;gCAArC,qBAAqB,KAAG,MAAM,GAAG,IAAI;8CAArC,qBAAqB,KAAG,MAAM,GAAG,IAAI;uCAArC,qBAAqB,KAAG,MAAM,GAAG,IAAI;2CAArC,qBAAqB,KAAG,MAAM,GAAG,IAAI;yCAArC,qBAAqB,KAAG,MAAM,GAAG,IAAI;kCAArC,qBAAqB,KAAG,MAAM,GAAG,IAAI;wCAArC,qBAAqB,KAAG,MAAM,GAAG,IAAI;iCAkyBtC,qBAAqB;gCAlyBpB,qBAAqB,KAAG,MAAM,GAAG,IAAI;CA+yBlD,CAAC;AAGX,OAAO,EACL,OAAO,EACP,aAAa,EACb,eAAe,EACf,SAAS,EACT,MAAM,EACN,MAAM,EACN,QAAQ,EACR,SAAS,EACT,eAAe,EACf,OAAO,EACP,QAAQ,EACR,QAAQ,GACT,CAAC;AAEF,YAAY,EACV,qBAAqB,EACrB,cAAc,EACd,kBAAkB,EAClB,wBAAwB,GACzB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as Styles from "@universityofmaryland/web-styles-library";
|
|
2
2
|
import { AttributeNames } from "./names.js";
|
|
3
3
|
import { AttributeValues } from "./values.js";
|
|
4
|
+
import { devWarning } from "./errors.js";
|
|
4
5
|
const isAttributeTrue = ({
|
|
5
6
|
element,
|
|
6
7
|
attributeName,
|
|
@@ -25,12 +26,12 @@ const isAttributeNotNull = ({
|
|
|
25
26
|
if (value === "false") return false;
|
|
26
27
|
return value !== null;
|
|
27
28
|
};
|
|
28
|
-
const
|
|
29
|
+
const deprecationWarning = ({
|
|
29
30
|
element,
|
|
30
31
|
attributeNameOld,
|
|
31
32
|
attributeNameNew
|
|
32
33
|
}) => {
|
|
33
|
-
|
|
34
|
+
devWarning(
|
|
34
35
|
`UMD Web Component: ${element.nodeName} - Attribute "${attributeNameOld}" is deprecated. Use "${attributeNameNew}" instead. This attribute will be removed in version 2.0.`
|
|
35
36
|
);
|
|
36
37
|
};
|
|
@@ -49,7 +50,7 @@ const checkDeprecatedAttribute = (props) => {
|
|
|
49
50
|
attributeValue
|
|
50
51
|
});
|
|
51
52
|
if (isDeprecatedUsed) {
|
|
52
|
-
|
|
53
|
+
deprecationWarning(props);
|
|
53
54
|
return true;
|
|
54
55
|
}
|
|
55
56
|
return false;
|
|
@@ -68,7 +69,7 @@ const createValueGetter = ({
|
|
|
68
69
|
if (deprecatedName) {
|
|
69
70
|
const deprecatedValue = element.getAttribute(deprecatedName);
|
|
70
71
|
if (deprecatedValue !== null) {
|
|
71
|
-
|
|
72
|
+
deprecationWarning({
|
|
72
73
|
element,
|
|
73
74
|
attributeNameOld: deprecatedName,
|
|
74
75
|
attributeNameNew: currentName
|
|
@@ -284,10 +285,16 @@ const isDisplay = {
|
|
|
284
285
|
attributeName: AttributeNames.deprecated.type.TYPE,
|
|
285
286
|
attributeValue: AttributeValues.layout.defaultInteriorCentered
|
|
286
287
|
}),
|
|
287
|
-
statement:
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
288
|
+
statement: (props) => checkDeprecatedAttribute({
|
|
289
|
+
...props,
|
|
290
|
+
attributeNameOld: AttributeNames.deprecated.display.DISPLAY,
|
|
291
|
+
attributeNameNew: AttributeNames.display.default,
|
|
292
|
+
attributeValue: AttributeValues.display.statement
|
|
293
|
+
}) || isAttributeTrue({
|
|
294
|
+
...props,
|
|
295
|
+
attributeName: AttributeNames.display.default,
|
|
296
|
+
attributeValue: AttributeValues.display.statement
|
|
297
|
+
}),
|
|
291
298
|
sticky: (props) => checkDeprecatedAttribute({
|
|
292
299
|
...props,
|
|
293
300
|
attributeNameOld: AttributeNames.deprecated.type.TYPE,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checks.js","sources":["../../source/attributes/checks.ts"],"sourcesContent":["/**\n * Attribute Check Utilities\n *\n * Provides a comprehensive set of functions to check attribute states on HTML elements.\n * These utilities form the foundation of the component attribute system.\n *\n * ## Function Categories:\n *\n * 1. **isTheme**: Theme-related checks (dark, light, gold, maryland)\n * 2. **isVisual**: Visual state checks (aligned, bordered, transparent, etc.)\n * 3. **isDisplay**: Display mode checks (feature, list, promo, etc.)\n * 4. **isLayout**: Layout configuration checks (fixed, hidden, position)\n * 5. **isInfo**: Content type checks (admissions, events, news, etc.)\n * 6. **includesFeature**: Feature flag checks (animation, lazyLoad, etc.)\n * 7. **getValue**: Attribute value getters (url, title, styleProps)\n *\n * ## Naming Convention:\n * - `is*` functions return boolean values\n * - `includes*` functions check for feature presence\n * - `getValue*` functions return string values\n *\n * ## Deprecation Handling:\n * Many functions handle both current (data-*) and deprecated attribute names,\n * logging warnings when deprecated attributes are used.\n */\nimport * as Styles from '@universityofmaryland/web-styles-library';\nimport { AttributeNames } from './names';\nimport { AttributeValues } from './values';\n\n// Types\n/**\n * Properties for attribute checking functions\n */\ninterface AttributeElementProps {\n /** The HTML element to check attributes on */\n element: HTMLElement;\n /** Default value to return if attribute is not found */\n defaultValue?: boolean;\n}\n\ninterface AttributeProps extends AttributeElementProps {\n attributeName: string;\n attributeValue: string;\n}\n\ntype AttributeNullProps = Omit<AttributeProps, 'attributeValue'>;\n\ninterface DeprecatedAttributeProps extends AttributeElementProps {\n attributeNameOld: string;\n attributeNameNew: string;\n attributeValue: string;\n}\n\ninterface ValueGetterConfig {\n currentName: string;\n deprecatedName?: string;\n}\n\n// Core attribute check utilities\n\n/**\n * Checks if an attribute equals a specific value.\n * Returns defaultValue if attribute is not present.\n * Special handling: 'false' string always returns false.\n *\n * @internal\n */\nconst isAttributeTrue = ({\n element,\n attributeName,\n attributeValue,\n defaultValue = false,\n}: AttributeProps): boolean => {\n const value = element.getAttribute(attributeName);\n\n if (value === null) {\n return defaultValue;\n }\n\n if (value === 'false') {\n return false;\n }\n\n return value === attributeValue;\n};\n\nconst isAttributeNotNull = ({\n element,\n attributeName,\n}: AttributeNullProps): boolean => {\n const value = element.getAttribute(attributeName);\n\n if (value === 'true') return true;\n if (value === 'false') return false;\n\n return value !== null;\n};\n\nconst depcreationWarning = ({\n element,\n attributeNameOld,\n attributeNameNew,\n}: {\n element: HTMLElement;\n attributeNameOld: string;\n attributeNameNew: string;\n}) => {\n console.warn(\n `UMD Web Component: ${element.nodeName} - Attribute \"${attributeNameOld}\" is deprecated. ` +\n `Use \"${attributeNameNew}\" instead. This attribute will be removed in version 2.0.`,\n );\n};\n\nconst checkDeprecatedAttribute = (props: DeprecatedAttributeProps): boolean => {\n const {\n element,\n attributeNameOld,\n attributeNameNew,\n attributeValue,\n ...rest\n } = props;\n const isDeprecatedUsed = isAttributeTrue({\n ...rest,\n element,\n attributeName: attributeNameOld,\n attributeValue,\n });\n\n if (isDeprecatedUsed) {\n depcreationWarning(props);\n return true;\n }\n\n return false;\n};\n\nconst createAttributeCheck =\n (attributeName: string, attributeValue: string, defaultValue = false) =>\n (props: AttributeElementProps): boolean =>\n isAttributeTrue({\n ...props,\n attributeName,\n attributeValue,\n defaultValue,\n });\n\nconst createValueGetter = ({\n currentName,\n deprecatedName,\n}: ValueGetterConfig) => {\n return ({ element }: AttributeElementProps): string | null => {\n if (deprecatedName) {\n const deprecatedValue = element.getAttribute(deprecatedName);\n if (deprecatedValue !== null) {\n depcreationWarning({\n element,\n attributeNameOld: deprecatedName,\n attributeNameNew: currentName,\n });\n\n return deprecatedValue;\n }\n }\n\n const value = element.getAttribute(currentName);\n if (value !== null) {\n return value;\n }\n\n return null;\n };\n};\n\n// Value checks with null checks\nconst hasInfo = {\n gifts: (props: AttributeElementProps) =>\n isAttributeNotNull({\n ...props,\n attributeName: AttributeNames.information.gift,\n }),\n search: (props: AttributeElementProps) =>\n isAttributeNotNull({\n ...props,\n attributeName: AttributeNames.information.search,\n }),\n};\n\n// Decoration checks\nconst hasDecoration = {\n line: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.option.OPTIONAL_HAS_LINE,\n attributeNameNew: AttributeNames.decoration.line,\n attributeValue: '',\n }) ||\n isAttributeNotNull({\n ...props,\n attributeName: AttributeNames.decoration.line,\n }),\n};\n\n// Feature checks\nconst includesFeature = {\n animation: createAttributeCheck(\n AttributeNames.feature.animation,\n AttributeValues.state.TRUE,\n true,\n ),\n imageExpand: createAttributeCheck(\n AttributeNames.feature.imageExpand,\n AttributeValues.state.TRUE,\n true,\n ),\n fullScreenOption: createAttributeCheck(\n AttributeNames.deprecated.feature.FULLSCREEN,\n AttributeValues.state.TRUE,\n true,\n ),\n visualTime: createAttributeCheck(\n AttributeNames.deprecated.feature.SHOW_TIME,\n AttributeValues.state.TRUE,\n true,\n ),\n lazyLoad: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.feed.FEED_LAZY_LOAD,\n attributeNameNew: AttributeNames.feature.lazyLoad,\n attributeValue: AttributeValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.feature.lazyLoad,\n attributeValue: AttributeValues.state.TRUE,\n }),\n} as const;\n\n// Data checks\nconst isData = {\n type: {\n academic: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.feed.type,\n attributeValue: AttributeValues.data.type.academic,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.feed.type,\n attributeValue: AttributeValues.data.type.academic,\n }),\n },\n union: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.feed.FEED_UNION,\n attributeNameNew: AttributeNames.feed.union,\n attributeValue: AttributeValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.feed.union,\n attributeValue: AttributeValues.state.TRUE,\n defaultValue: true,\n }),\n} as const;\n\n// Display checks\nconst isDisplay = {\n block: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.display.DISPLAY_TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.block,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.block,\n }),\n feature: createAttributeCheck(\n AttributeNames.deprecated.display.DISPLAY,\n AttributeValues.display.feature,\n ),\n featured: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.featured,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.featured,\n }),\n hero: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.hero,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.hero,\n }),\n list: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.display.DISPLAY,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.list,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.list,\n }),\n outline: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.type.OUTLINE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.type.OUTLINE,\n }),\n overlay: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.overlay,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.overlay,\n }),\n promo: createAttributeCheck(\n AttributeNames.deprecated.display.DISPLAY,\n AttributeValues.display.promo,\n ),\n primary: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.type.PRIMARY,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.type.PRIMARY,\n }),\n secondary: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.type.SECONDARY,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.type.SECONDARY,\n }),\n short: createAttributeCheck(\n AttributeNames.display.default,\n AttributeValues.display.short,\n ),\n standardCentered: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.layout.defaultCentered,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.deprecated.type.TYPE,\n attributeValue: AttributeValues.layout.defaultCentered,\n }),\n standardInterior: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.layout.defaultInterior,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.deprecated.type.TYPE,\n attributeValue: AttributeValues.layout.defaultInterior,\n }),\n standardInteriorCentered: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.layout.defaultInteriorCentered,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.deprecated.type.TYPE,\n attributeValue: AttributeValues.layout.defaultInteriorCentered,\n }),\n statement: createAttributeCheck(\n AttributeNames.deprecated.display.DISPLAY,\n AttributeValues.display.statement,\n ),\n sticky: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.sticky,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.sticky,\n }),\n stacked: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.stacked,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.stacked,\n }),\n stackedInteriorDeprecated: createAttributeCheck(\n AttributeNames.deprecated.type.TYPE,\n AttributeValues.layout.stackedInterior,\n ),\n stackedInterior: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.layout.stackedInterior,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.layout.stackedInterior,\n }),\n tabular: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.display.DISPLAY,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.tabular,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.tabular,\n }),\n mega: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.DATA_TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.mega,\n }) ||\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.mega,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.mega,\n }),\n visual: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.DATA_TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.visual,\n }) ||\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.visual,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.visual,\n }),\n simple: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.DATA_TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.simple,\n }) ||\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.simple,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.simple,\n }),\n} as const;\n\n// Information checks\nconst isInfo = {\n admissions: createAttributeCheck(\n AttributeNames.information.admissions,\n AttributeValues.state.TRUE,\n ),\n events: createAttributeCheck(\n AttributeNames.information.events,\n AttributeValues.state.TRUE,\n ),\n news: createAttributeCheck(\n AttributeNames.information.news,\n AttributeValues.state.TRUE,\n ),\n schools: createAttributeCheck(\n AttributeNames.information.schools,\n AttributeValues.state.TRUE,\n ),\n searchDomain: createAttributeCheck(\n AttributeNames.information.searchType,\n AttributeValues.search.domain,\n ),\n} as const;\n\n// Layout checks\nconst isLayout = {\n alertOff: createAttributeCheck(\n AttributeNames.layout.alertOff,\n AttributeValues.state.TRUE,\n ),\n alignmentRight: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.layout.LAYOUT_ALIGNMENT,\n attributeNameNew: AttributeNames.layout.alignment,\n attributeValue: AttributeValues.layout.right,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.alignment,\n attributeValue: AttributeValues.layout.right,\n }),\n fixed: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.layout.LAYOUT_FIXED,\n attributeNameNew: AttributeNames.layout.fixed,\n attributeValue: '',\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.fixed,\n attributeValue: AttributeValues.state.TRUE,\n }),\n fullImage: createAttributeCheck(\n AttributeNames.deprecated.type.TYPE,\n AttributeValues.layout.fullImage,\n ),\n heightSmall: (props: AttributeElementProps): boolean =>\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.height,\n attributeValue: AttributeValues.layout.small,\n }),\n hidden: createAttributeCheck(\n AttributeNames.layout.hidden,\n AttributeValues.state.TRUE,\n ),\n image: createAttributeCheck(\n AttributeNames.deprecated.type.TYPE,\n AttributeValues.display.image,\n ),\n imagePositionRight: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.layout.LAYOUT_IMAGE_POSITION,\n attributeNameNew: AttributeNames.layout.imagePosition,\n attributeValue: AttributeValues.layout.right,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.imagePosition,\n attributeValue: AttributeValues.layout.right,\n defaultValue: true,\n }),\n imagePositionLeft: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.layout.LAYOUT_IMAGE_POSITION,\n attributeNameNew: AttributeNames.layout.imagePosition,\n attributeValue: AttributeValues.layout.left,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.imagePosition,\n attributeValue: AttributeValues.layout.left,\n defaultValue: false,\n }),\n imageScaled: (props: AttributeElementProps): boolean =>\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.imageScaled,\n attributeValue: AttributeValues.state.TRUE,\n defaultValue: true,\n }),\n interior: createAttributeCheck(\n AttributeNames.layout.interior,\n AttributeValues.state.TRUE,\n ),\n lock: createAttributeCheck(\n AttributeNames.layout.lock,\n AttributeValues.state.TRUE,\n ),\n lockFull: createAttributeCheck(\n AttributeNames.layout.lock,\n AttributeValues.layout.large,\n ),\n reverse: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.layout.DEFAULT,\n attributeNameNew: AttributeNames.layout.reverse,\n attributeValue: AttributeValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.reverse,\n attributeValue: AttributeValues.state.TRUE,\n }),\n spaceHorizontalLarge: (props: AttributeElementProps): boolean =>\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.spaceHorizontal,\n attributeValue: AttributeValues.layout.large,\n }),\n textCentered: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.visual.VISUAL_TEXT_CENTER,\n attributeNameNew: AttributeNames.layout.text,\n attributeValue: AttributeValues.layout.center,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.text,\n attributeValue: AttributeValues.layout.center,\n }),\n} as const;\n\n// Social checks\n\nconst isSharing = {\n email: createAttributeCheck(\n AttributeNames.sharing.email,\n AttributeValues.state.TRUE,\n ),\n print: createAttributeCheck(\n AttributeNames.sharing.print,\n AttributeValues.state.TRUE,\n ),\n} as const;\n\nconst includesSharing = {\n facebook: createAttributeCheck(\n AttributeNames.social.facebook,\n AttributeValues.state.TRUE,\n true,\n ),\n twitter: createAttributeCheck(\n AttributeNames.social.twitter,\n AttributeValues.state.TRUE,\n true,\n ),\n} as const;\n\n// Theme checks\nconst isTheme = {\n dark: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.theme.THEME_DEPRECATD,\n attributeNameNew: AttributeNames.theme.default,\n attributeValue: AttributeValues.theme.DARK,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.theme.default,\n attributeValue: AttributeValues.theme.DARK,\n }),\n gold: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.theme.THEME_DEPRECATD,\n attributeNameNew: AttributeNames.theme.default,\n attributeValue: AttributeValues.theme.GOLD,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.theme.default,\n attributeValue: AttributeValues.theme.GOLD,\n }),\n light: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.theme.THEME_DEPRECATD,\n attributeNameNew: AttributeNames.theme.default,\n attributeValue: AttributeValues.theme.LIGHT,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.theme.default,\n attributeValue: AttributeValues.theme.LIGHT,\n }),\n maryland: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.theme.THEME_DEPRECATD,\n attributeNameNew: AttributeNames.theme.default,\n attributeValue: AttributeValues.theme.MARYLAND,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.theme.default,\n attributeValue: AttributeValues.theme.MARYLAND,\n }),\n} as const;\n\n// Visual checks\nconst isVisual = {\n aligned: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.visual.VISUAL_ALIGN,\n attributeNameNew: AttributeNames.visual.imageAligned,\n attributeValue: AttributeValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.imageAligned,\n attributeValue: AttributeValues.state.TRUE,\n }),\n bordered: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.visual.VISUAL_BORDER,\n attributeNameNew: AttributeNames.visual.bordered,\n attributeValue: AttributeValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.bordered,\n attributeValue: AttributeValues.state.TRUE,\n }),\n campaign: createAttributeCheck(\n AttributeNames.visual.campaign,\n AttributeValues.campaign.forward,\n ),\n icon_seal: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.visual.VISUAL_HAS_LOGO,\n attributeNameNew: AttributeNames.visual.iconSeal,\n attributeValue: AttributeValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.iconSeal,\n attributeValue: AttributeValues.state.TRUE,\n }),\n open: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.state.STATE_DEPRECATD,\n attributeNameNew: AttributeNames.visual.open,\n attributeValue: AttributeValues.state.OPENED,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.open,\n attributeValue: AttributeValues.state.TRUE,\n }),\n play: createAttributeCheck(\n AttributeNames.visual.play,\n AttributeValues.state.TRUE,\n ),\n quote: createAttributeCheck(\n AttributeNames.deprecated.visual.VISUAL_QUOTE,\n AttributeValues.state.TRUE,\n ),\n showIcon: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.visual.VISUAL_ICON,\n attributeNameNew: AttributeNames.visual.icon,\n attributeValue: AttributeValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.icon,\n attributeValue: AttributeValues.state.TRUE,\n }),\n sizeNormal: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.display.DISPLAY_SIZE,\n attributeNameNew: AttributeNames.visual.size,\n attributeValue: AttributeValues.size.NORMAL,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.size,\n attributeValue: AttributeValues.size.NORMAL,\n }),\n showTime: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.feature.SHOW_TIME,\n attributeNameNew: AttributeNames.visual.time,\n attributeValue: AttributeValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.time,\n attributeValue: AttributeValues.state.TRUE,\n defaultValue: true,\n }),\n sizeLarge: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.display.DISPLAY_SIZE,\n attributeNameNew: AttributeNames.visual.size,\n attributeValue: AttributeValues.size.LARGE,\n }) ||\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.display.DISPLAY_SIZE,\n attributeNameNew: AttributeNames.visual.size,\n attributeValue: '',\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.size,\n attributeValue: AttributeValues.size.LARGE,\n }),\n stickyFirst: createAttributeCheck(\n AttributeNames.deprecated.option.OPTIONAL_STICKY_FIRST,\n AttributeValues.state.TRUE,\n true,\n ),\n transparent: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.visual.VISUAL_TRANSPARENT,\n attributeNameNew: AttributeNames.visual.transparent,\n attributeValue: AttributeValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.transparent,\n attributeValue: AttributeValues.state.TRUE,\n }),\n} as const;\n\n// Value getters\nconst getValue = {\n alertUrl: createValueGetter({\n currentName: AttributeNames.information.alertUrl,\n }),\n loadingPriority: createValueGetter({\n currentName: AttributeNames.loading.priority,\n }),\n daysToHide: createValueGetter({\n currentName: AttributeNames.visual.hiddenDays,\n deprecatedName: AttributeNames.deprecated.visual.VISUAL_DAYS_TO_HIDE,\n }),\n feedEntryRemoveIds: createValueGetter({\n currentName: AttributeNames.information.removeIds,\n deprecatedName: AttributeNames.deprecated.feed.FEED_NOT_ENTRIES,\n }),\n feedFilterIds: createValueGetter({\n currentName: AttributeNames.information.filterIds,\n deprecatedName: AttributeNames.deprecated.feed.FEED_CATEGORIES,\n }),\n feedToken: createValueGetter({\n currentName: AttributeNames.information.token,\n deprecatedName: AttributeNames.deprecated.feed.FEED_TOKEN,\n }),\n giftUrl: createValueGetter({\n currentName: AttributeNames.information.gift,\n }),\n id: createValueGetter({\n currentName: AttributeNames.information.id,\n }),\n ids: createValueGetter({\n currentName: AttributeNames.information.ids,\n }),\n layoutColumnCount: createValueGetter({\n currentName: AttributeNames.layout.columnCount,\n deprecatedName: AttributeNames.deprecated.feed.FEED_COLUMN_COUNT,\n }),\n layoutLock: createValueGetter({\n currentName: AttributeNames.layout.lock,\n }),\n layoutRowCount: createValueGetter({\n currentName: AttributeNames.layout.rowCount,\n deprecatedName: AttributeNames.deprecated.feed.FEED_ROW_COUNT,\n }),\n mediaTrained: createValueGetter({\n currentName: AttributeNames.information.mediaTrained,\n }),\n title: createValueGetter({\n currentName: AttributeNames.information.title,\n }),\n topPosition: createValueGetter({\n currentName: AttributeNames.layout.position,\n deprecatedName: AttributeNames.deprecated.layout.LAYOUT_STICKY_TOP,\n }),\n styleProps: (props: AttributeElementProps) => {\n const cssString = createValueGetter({\n ...props,\n currentName: AttributeNames.deprecated.visual.VISUAL_STYLE_PROPS,\n });\n\n if (cssString && typeof cssString === 'string') {\n return Styles.utilities.create.jss.objectFromString(cssString);\n }\n },\n url: createValueGetter({\n currentName: AttributeNames.information.url,\n }),\n} as const;\n\n// Public API\nexport {\n hasInfo,\n hasDecoration,\n includesFeature,\n isDisplay,\n isData,\n isInfo,\n isLayout,\n isSharing,\n includesSharing,\n isTheme,\n isVisual,\n getValue,\n};\n\nexport type {\n AttributeElementProps,\n AttributeProps,\n AttributeNullProps,\n DeprecatedAttributeProps,\n};\n"],"names":[],"mappings":";;;AAmEA,MAAM,kBAAkB,CAAC;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AACjB,MAA+B;AAC7B,QAAM,QAAQ,QAAQ,aAAa,aAAa;AAEhD,MAAI,UAAU,MAAM;AAClB,WAAO;AAAA,EACT;AAEA,MAAI,UAAU,SAAS;AACrB,WAAO;AAAA,EACT;AAEA,SAAO,UAAU;AACnB;AAEA,MAAM,qBAAqB,CAAC;AAAA,EAC1B;AAAA,EACA;AACF,MAAmC;AACjC,QAAM,QAAQ,QAAQ,aAAa,aAAa;AAEhD,MAAI,UAAU,OAAQ,QAAO;AAC7B,MAAI,UAAU,QAAS,QAAO;AAE9B,SAAO,UAAU;AACnB;AAEA,MAAM,qBAAqB,CAAC;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AACF,MAIM;AACJ,UAAQ;AAAA,IACN,sBAAsB,QAAQ,QAAQ,iBAAiB,gBAAgB,yBAC7D,gBAAgB;AAAA,EAAA;AAE9B;AAEA,MAAM,2BAA2B,CAAC,UAA6C;AAC7E,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EAAA,IACD;AACJ,QAAM,mBAAmB,gBAAgB;AAAA,IACvC,GAAG;AAAA,IACH;AAAA,IACA,eAAe;AAAA,IACf;AAAA,EAAA,CACD;AAED,MAAI,kBAAkB;AACpB,uBAAmB,KAAK;AAC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SAAS,kBAAkB;AAAA,IACzB,aAAa,eAAe,YAAY;AAAA,EAAA,CACzC;AAAA,EACD,IAAI,kBAAkB;AAAA,IACpB,aAAa,eAAe,YAAY;AAAA,EAAA,CACzC;AAAA,EACD,KAAK,kBAAkB;AAAA,IACrB,aAAa,eAAe,YAAY;AAAA,EAAA,CACzC;AAAA,EACD,mBAAmB,kBAAkB;AAAA,IACnC,aAAa,eAAe,OAAO;AAAA,IACnC,gBAAgB,eAAe,WAAW,KAAK;AAAA,EAAA,CAChD;AAAA,EACD,YAAY,kBAAkB;AAAA,IAC5B,aAAa,eAAe,OAAO;AAAA,EAAA,CACpC;AAAA,EACD,gBAAgB,kBAAkB;AAAA,IAChC,aAAa,eAAe,OAAO;AAAA,IACnC,gBAAgB,eAAe,WAAW,KAAK;AAAA,EAAA,CAChD;AAAA,EACD,cAAc,kBAAkB;AAAA,IAC9B,aAAa,eAAe,YAAY;AAAA,EAAA,CACzC;AAAA,EACD,OAAO,kBAAkB;AAAA,IACvB,aAAa,eAAe,YAAY;AAAA,EAAA,CACzC;AAAA,EACD,aAAa,kBAAkB;AAAA,IAC7B,aAAa,eAAe,OAAO;AAAA,IACnC,gBAAgB,eAAe,WAAW,OAAO;AAAA,EAAA,CAClD;AAAA,EACD,YAAY,CAAC,UAAiC;AAC5C,UAAM,YAAY,kBAAkB;AAAA,MAClC,GAAG;AAAA,MACH,aAAa,eAAe,WAAW,OAAO;AAAA,IAAA,CAC/C;AAED,QAAI,aAAa,OAAO,cAAc,UAAU;AAC9C,aAAO,OAAO,UAAU,OAAO,IAAI,iBAAiB,SAAS;AAAA,IAC/D;AAAA,EACF;AAAA,EACA,KAAK,kBAAkB;AAAA,IACrB,aAAa,eAAe,YAAY;AAAA,EAAA,CACzC;AACH;"}
|
|
1
|
+
{"version":3,"file":"checks.js","sources":["../../source/attributes/checks.ts"],"sourcesContent":["/**\n * Attribute Check Utilities\n *\n * Provides a comprehensive set of functions to check attribute states on HTML elements.\n * These utilities form the foundation of the component attribute system.\n *\n * ## Function Categories:\n *\n * 1. **isTheme**: Theme-related checks (dark, light, gold, maryland)\n * 2. **isVisual**: Visual state checks (aligned, bordered, transparent, etc.)\n * 3. **isDisplay**: Display mode checks (feature, list, promo, etc.)\n * 4. **isLayout**: Layout configuration checks (fixed, hidden, position)\n * 5. **isInfo**: Content type checks (admissions, events, news, etc.)\n * 6. **includesFeature**: Feature flag checks (animation, lazyLoad, etc.)\n * 7. **getValue**: Attribute value getters (url, title, styleProps)\n *\n * ## Naming Convention:\n * - `is*` functions return boolean values\n * - `includes*` functions check for feature presence\n * - `getValue*` functions return string values\n *\n * ## Deprecation Handling:\n * Many functions handle both current (data-*) and deprecated attribute names,\n * logging warnings when deprecated attributes are used.\n */\nimport * as Styles from '@universityofmaryland/web-styles-library';\nimport { AttributeNames } from './names';\nimport { AttributeValues } from './values';\nimport { devWarning } from './errors';\n\n// Types\n/**\n * Properties for attribute checking functions\n */\ninterface AttributeElementProps {\n /** The HTML element to check attributes on */\n element: HTMLElement;\n /** Default value to return if attribute is not found */\n defaultValue?: boolean;\n}\n\ninterface AttributeProps extends AttributeElementProps {\n attributeName: string;\n attributeValue: string;\n}\n\ntype AttributeNullProps = Omit<AttributeProps, 'attributeValue'>;\n\ninterface DeprecatedAttributeProps extends AttributeElementProps {\n attributeNameOld: string;\n attributeNameNew: string;\n attributeValue: string;\n}\n\ninterface ValueGetterConfig {\n currentName: string;\n deprecatedName?: string;\n}\n\n// Core attribute check utilities\n\n/**\n * Checks if an attribute equals a specific value.\n * Returns defaultValue if attribute is not present.\n * Special handling: 'false' string always returns false.\n *\n * @internal\n */\nconst isAttributeTrue = ({\n element,\n attributeName,\n attributeValue,\n defaultValue = false,\n}: AttributeProps): boolean => {\n const value = element.getAttribute(attributeName);\n\n if (value === null) {\n return defaultValue;\n }\n\n if (value === 'false') {\n return false;\n }\n\n return value === attributeValue;\n};\n\nconst isAttributeNotNull = ({\n element,\n attributeName,\n}: AttributeNullProps): boolean => {\n const value = element.getAttribute(attributeName);\n\n if (value === 'true') return true;\n if (value === 'false') return false;\n\n return value !== null;\n};\n\nconst deprecationWarning = ({\n element,\n attributeNameOld,\n attributeNameNew,\n}: {\n element: HTMLElement;\n attributeNameOld: string;\n attributeNameNew: string;\n}) => {\n devWarning(\n `UMD Web Component: ${element.nodeName} - Attribute \"${attributeNameOld}\" is deprecated. ` +\n `Use \"${attributeNameNew}\" instead. This attribute will be removed in version 2.0.`,\n );\n};\n\nconst checkDeprecatedAttribute = (props: DeprecatedAttributeProps): boolean => {\n const {\n element,\n attributeNameOld,\n attributeNameNew,\n attributeValue,\n ...rest\n } = props;\n const isDeprecatedUsed = isAttributeTrue({\n ...rest,\n element,\n attributeName: attributeNameOld,\n attributeValue,\n });\n\n if (isDeprecatedUsed) {\n deprecationWarning(props);\n return true;\n }\n\n return false;\n};\n\nconst createAttributeCheck =\n (attributeName: string, attributeValue: string, defaultValue = false) =>\n (props: AttributeElementProps): boolean =>\n isAttributeTrue({\n ...props,\n attributeName,\n attributeValue,\n defaultValue,\n });\n\nconst createValueGetter = ({\n currentName,\n deprecatedName,\n}: ValueGetterConfig) => {\n return ({ element }: AttributeElementProps): string | null => {\n if (deprecatedName) {\n const deprecatedValue = element.getAttribute(deprecatedName);\n if (deprecatedValue !== null) {\n deprecationWarning({\n element,\n attributeNameOld: deprecatedName,\n attributeNameNew: currentName,\n });\n\n return deprecatedValue;\n }\n }\n\n const value = element.getAttribute(currentName);\n if (value !== null) {\n return value;\n }\n\n return null;\n };\n};\n\n// Value checks with null checks\nconst hasInfo = {\n gifts: (props: AttributeElementProps) =>\n isAttributeNotNull({\n ...props,\n attributeName: AttributeNames.information.gift,\n }),\n search: (props: AttributeElementProps) =>\n isAttributeNotNull({\n ...props,\n attributeName: AttributeNames.information.search,\n }),\n};\n\n// Decoration checks\nconst hasDecoration = {\n line: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.option.OPTIONAL_HAS_LINE,\n attributeNameNew: AttributeNames.decoration.line,\n attributeValue: '',\n }) ||\n isAttributeNotNull({\n ...props,\n attributeName: AttributeNames.decoration.line,\n }),\n};\n\n// Feature checks\nconst includesFeature = {\n animation: createAttributeCheck(\n AttributeNames.feature.animation,\n AttributeValues.state.TRUE,\n true,\n ),\n imageExpand: createAttributeCheck(\n AttributeNames.feature.imageExpand,\n AttributeValues.state.TRUE,\n true,\n ),\n fullScreenOption: createAttributeCheck(\n AttributeNames.deprecated.feature.FULLSCREEN,\n AttributeValues.state.TRUE,\n true,\n ),\n visualTime: createAttributeCheck(\n AttributeNames.deprecated.feature.SHOW_TIME,\n AttributeValues.state.TRUE,\n true,\n ),\n lazyLoad: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.feed.FEED_LAZY_LOAD,\n attributeNameNew: AttributeNames.feature.lazyLoad,\n attributeValue: AttributeValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.feature.lazyLoad,\n attributeValue: AttributeValues.state.TRUE,\n }),\n} as const;\n\n// Data checks\nconst isData = {\n type: {\n academic: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.feed.type,\n attributeValue: AttributeValues.data.type.academic,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.feed.type,\n attributeValue: AttributeValues.data.type.academic,\n }),\n },\n union: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.feed.FEED_UNION,\n attributeNameNew: AttributeNames.feed.union,\n attributeValue: AttributeValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.feed.union,\n attributeValue: AttributeValues.state.TRUE,\n defaultValue: true,\n }),\n} as const;\n\n// Display checks\nconst isDisplay = {\n block: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.display.DISPLAY_TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.block,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.block,\n }),\n feature: createAttributeCheck(\n AttributeNames.deprecated.display.DISPLAY,\n AttributeValues.display.feature,\n ),\n featured: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.featured,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.featured,\n }),\n hero: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.hero,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.hero,\n }),\n list: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.display.DISPLAY,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.list,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.list,\n }),\n outline: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.type.OUTLINE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.type.OUTLINE,\n }),\n overlay: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.overlay,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.overlay,\n }),\n promo: createAttributeCheck(\n AttributeNames.deprecated.display.DISPLAY,\n AttributeValues.display.promo,\n ),\n primary: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.type.PRIMARY,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.type.PRIMARY,\n }),\n secondary: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.type.SECONDARY,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.type.SECONDARY,\n }),\n short: createAttributeCheck(\n AttributeNames.display.default,\n AttributeValues.display.short,\n ),\n standardCentered: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.layout.defaultCentered,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.deprecated.type.TYPE,\n attributeValue: AttributeValues.layout.defaultCentered,\n }),\n standardInterior: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.layout.defaultInterior,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.deprecated.type.TYPE,\n attributeValue: AttributeValues.layout.defaultInterior,\n }),\n standardInteriorCentered: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.layout.defaultInteriorCentered,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.deprecated.type.TYPE,\n attributeValue: AttributeValues.layout.defaultInteriorCentered,\n }),\n statement: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.display.DISPLAY,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.statement,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.statement,\n }),\n sticky: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.sticky,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.sticky,\n }),\n stacked: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.stacked,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.stacked,\n }),\n stackedInteriorDeprecated: createAttributeCheck(\n AttributeNames.deprecated.type.TYPE,\n AttributeValues.layout.stackedInterior,\n ),\n stackedInterior: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.layout.stackedInterior,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.layout.stackedInterior,\n }),\n tabular: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.display.DISPLAY,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.tabular,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.tabular,\n }),\n mega: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.DATA_TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.mega,\n }) ||\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.mega,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.mega,\n }),\n visual: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.DATA_TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.visual,\n }) ||\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.visual,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.visual,\n }),\n simple: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.DATA_TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.simple,\n }) ||\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.simple,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.simple,\n }),\n} as const;\n\n// Information checks\nconst isInfo = {\n admissions: createAttributeCheck(\n AttributeNames.information.admissions,\n AttributeValues.state.TRUE,\n ),\n events: createAttributeCheck(\n AttributeNames.information.events,\n AttributeValues.state.TRUE,\n ),\n news: createAttributeCheck(\n AttributeNames.information.news,\n AttributeValues.state.TRUE,\n ),\n schools: createAttributeCheck(\n AttributeNames.information.schools,\n AttributeValues.state.TRUE,\n ),\n searchDomain: createAttributeCheck(\n AttributeNames.information.searchType,\n AttributeValues.search.domain,\n ),\n} as const;\n\n// Layout checks\nconst isLayout = {\n alertOff: createAttributeCheck(\n AttributeNames.layout.alertOff,\n AttributeValues.state.TRUE,\n ),\n alignmentRight: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.layout.LAYOUT_ALIGNMENT,\n attributeNameNew: AttributeNames.layout.alignment,\n attributeValue: AttributeValues.layout.right,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.alignment,\n attributeValue: AttributeValues.layout.right,\n }),\n fixed: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.layout.LAYOUT_FIXED,\n attributeNameNew: AttributeNames.layout.fixed,\n attributeValue: '',\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.fixed,\n attributeValue: AttributeValues.state.TRUE,\n }),\n fullImage: createAttributeCheck(\n AttributeNames.deprecated.type.TYPE,\n AttributeValues.layout.fullImage,\n ),\n heightSmall: (props: AttributeElementProps): boolean =>\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.height,\n attributeValue: AttributeValues.layout.small,\n }),\n hidden: createAttributeCheck(\n AttributeNames.layout.hidden,\n AttributeValues.state.TRUE,\n ),\n image: createAttributeCheck(\n AttributeNames.deprecated.type.TYPE,\n AttributeValues.display.image,\n ),\n imagePositionRight: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.layout.LAYOUT_IMAGE_POSITION,\n attributeNameNew: AttributeNames.layout.imagePosition,\n attributeValue: AttributeValues.layout.right,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.imagePosition,\n attributeValue: AttributeValues.layout.right,\n defaultValue: true,\n }),\n imagePositionLeft: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.layout.LAYOUT_IMAGE_POSITION,\n attributeNameNew: AttributeNames.layout.imagePosition,\n attributeValue: AttributeValues.layout.left,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.imagePosition,\n attributeValue: AttributeValues.layout.left,\n defaultValue: false,\n }),\n imageScaled: (props: AttributeElementProps): boolean =>\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.imageScaled,\n attributeValue: AttributeValues.state.TRUE,\n defaultValue: true,\n }),\n interior: createAttributeCheck(\n AttributeNames.layout.interior,\n AttributeValues.state.TRUE,\n ),\n lock: createAttributeCheck(\n AttributeNames.layout.lock,\n AttributeValues.state.TRUE,\n ),\n lockFull: createAttributeCheck(\n AttributeNames.layout.lock,\n AttributeValues.layout.large,\n ),\n reverse: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.layout.DEFAULT,\n attributeNameNew: AttributeNames.layout.reverse,\n attributeValue: AttributeValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.reverse,\n attributeValue: AttributeValues.state.TRUE,\n }),\n spaceHorizontalLarge: (props: AttributeElementProps): boolean =>\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.spaceHorizontal,\n attributeValue: AttributeValues.layout.large,\n }),\n textCentered: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.visual.VISUAL_TEXT_CENTER,\n attributeNameNew: AttributeNames.layout.text,\n attributeValue: AttributeValues.layout.center,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.text,\n attributeValue: AttributeValues.layout.center,\n }),\n} as const;\n\n// Social checks\n\nconst isSharing = {\n email: createAttributeCheck(\n AttributeNames.sharing.email,\n AttributeValues.state.TRUE,\n ),\n print: createAttributeCheck(\n AttributeNames.sharing.print,\n AttributeValues.state.TRUE,\n ),\n} as const;\n\nconst includesSharing = {\n facebook: createAttributeCheck(\n AttributeNames.social.facebook,\n AttributeValues.state.TRUE,\n true,\n ),\n twitter: createAttributeCheck(\n AttributeNames.social.twitter,\n AttributeValues.state.TRUE,\n true,\n ),\n} as const;\n\n// Theme checks\nconst isTheme = {\n dark: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.theme.THEME_DEPRECATD,\n attributeNameNew: AttributeNames.theme.default,\n attributeValue: AttributeValues.theme.DARK,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.theme.default,\n attributeValue: AttributeValues.theme.DARK,\n }),\n gold: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.theme.THEME_DEPRECATD,\n attributeNameNew: AttributeNames.theme.default,\n attributeValue: AttributeValues.theme.GOLD,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.theme.default,\n attributeValue: AttributeValues.theme.GOLD,\n }),\n light: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.theme.THEME_DEPRECATD,\n attributeNameNew: AttributeNames.theme.default,\n attributeValue: AttributeValues.theme.LIGHT,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.theme.default,\n attributeValue: AttributeValues.theme.LIGHT,\n }),\n maryland: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.theme.THEME_DEPRECATD,\n attributeNameNew: AttributeNames.theme.default,\n attributeValue: AttributeValues.theme.MARYLAND,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.theme.default,\n attributeValue: AttributeValues.theme.MARYLAND,\n }),\n} as const;\n\n// Visual checks\nconst isVisual = {\n aligned: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.visual.VISUAL_ALIGN,\n attributeNameNew: AttributeNames.visual.imageAligned,\n attributeValue: AttributeValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.imageAligned,\n attributeValue: AttributeValues.state.TRUE,\n }),\n bordered: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.visual.VISUAL_BORDER,\n attributeNameNew: AttributeNames.visual.bordered,\n attributeValue: AttributeValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.bordered,\n attributeValue: AttributeValues.state.TRUE,\n }),\n campaign: createAttributeCheck(\n AttributeNames.visual.campaign,\n AttributeValues.campaign.forward,\n ),\n icon_seal: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.visual.VISUAL_HAS_LOGO,\n attributeNameNew: AttributeNames.visual.iconSeal,\n attributeValue: AttributeValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.iconSeal,\n attributeValue: AttributeValues.state.TRUE,\n }),\n open: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.state.STATE_DEPRECATD,\n attributeNameNew: AttributeNames.visual.open,\n attributeValue: AttributeValues.state.OPENED,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.open,\n attributeValue: AttributeValues.state.TRUE,\n }),\n play: createAttributeCheck(\n AttributeNames.visual.play,\n AttributeValues.state.TRUE,\n ),\n quote: createAttributeCheck(\n AttributeNames.deprecated.visual.VISUAL_QUOTE,\n AttributeValues.state.TRUE,\n ),\n showIcon: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.visual.VISUAL_ICON,\n attributeNameNew: AttributeNames.visual.icon,\n attributeValue: AttributeValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.icon,\n attributeValue: AttributeValues.state.TRUE,\n }),\n sizeNormal: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.display.DISPLAY_SIZE,\n attributeNameNew: AttributeNames.visual.size,\n attributeValue: AttributeValues.size.NORMAL,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.size,\n attributeValue: AttributeValues.size.NORMAL,\n }),\n showTime: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.feature.SHOW_TIME,\n attributeNameNew: AttributeNames.visual.time,\n attributeValue: AttributeValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.time,\n attributeValue: AttributeValues.state.TRUE,\n defaultValue: true,\n }),\n sizeLarge: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.display.DISPLAY_SIZE,\n attributeNameNew: AttributeNames.visual.size,\n attributeValue: AttributeValues.size.LARGE,\n }) ||\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.display.DISPLAY_SIZE,\n attributeNameNew: AttributeNames.visual.size,\n attributeValue: '',\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.size,\n attributeValue: AttributeValues.size.LARGE,\n }),\n stickyFirst: createAttributeCheck(\n AttributeNames.deprecated.option.OPTIONAL_STICKY_FIRST,\n AttributeValues.state.TRUE,\n true,\n ),\n transparent: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.visual.VISUAL_TRANSPARENT,\n attributeNameNew: AttributeNames.visual.transparent,\n attributeValue: AttributeValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.transparent,\n attributeValue: AttributeValues.state.TRUE,\n }),\n} as const;\n\n// Value getters\nconst getValue = {\n alertUrl: createValueGetter({\n currentName: AttributeNames.information.alertUrl,\n }),\n loadingPriority: createValueGetter({\n currentName: AttributeNames.loading.priority,\n }),\n daysToHide: createValueGetter({\n currentName: AttributeNames.visual.hiddenDays,\n deprecatedName: AttributeNames.deprecated.visual.VISUAL_DAYS_TO_HIDE,\n }),\n feedEntryRemoveIds: createValueGetter({\n currentName: AttributeNames.information.removeIds,\n deprecatedName: AttributeNames.deprecated.feed.FEED_NOT_ENTRIES,\n }),\n feedFilterIds: createValueGetter({\n currentName: AttributeNames.information.filterIds,\n deprecatedName: AttributeNames.deprecated.feed.FEED_CATEGORIES,\n }),\n feedToken: createValueGetter({\n currentName: AttributeNames.information.token,\n deprecatedName: AttributeNames.deprecated.feed.FEED_TOKEN,\n }),\n giftUrl: createValueGetter({\n currentName: AttributeNames.information.gift,\n }),\n id: createValueGetter({\n currentName: AttributeNames.information.id,\n }),\n ids: createValueGetter({\n currentName: AttributeNames.information.ids,\n }),\n layoutColumnCount: createValueGetter({\n currentName: AttributeNames.layout.columnCount,\n deprecatedName: AttributeNames.deprecated.feed.FEED_COLUMN_COUNT,\n }),\n layoutLock: createValueGetter({\n currentName: AttributeNames.layout.lock,\n }),\n layoutRowCount: createValueGetter({\n currentName: AttributeNames.layout.rowCount,\n deprecatedName: AttributeNames.deprecated.feed.FEED_ROW_COUNT,\n }),\n mediaTrained: createValueGetter({\n currentName: AttributeNames.information.mediaTrained,\n }),\n title: createValueGetter({\n currentName: AttributeNames.information.title,\n }),\n topPosition: createValueGetter({\n currentName: AttributeNames.layout.position,\n deprecatedName: AttributeNames.deprecated.layout.LAYOUT_STICKY_TOP,\n }),\n styleProps: (props: AttributeElementProps) => {\n const cssString = createValueGetter({\n ...props,\n currentName: AttributeNames.deprecated.visual.VISUAL_STYLE_PROPS,\n });\n\n if (cssString && typeof cssString === 'string') {\n return Styles.utilities.create.jss.objectFromString(cssString);\n }\n },\n url: createValueGetter({\n currentName: AttributeNames.information.url,\n }),\n} as const;\n\n// Public API\nexport {\n hasInfo,\n hasDecoration,\n includesFeature,\n isDisplay,\n isData,\n isInfo,\n isLayout,\n isSharing,\n includesSharing,\n isTheme,\n isVisual,\n getValue,\n};\n\nexport type {\n AttributeElementProps,\n AttributeProps,\n AttributeNullProps,\n DeprecatedAttributeProps,\n};\n"],"names":[],"mappings":";;;;AAoEA,MAAM,kBAAkB,CAAC;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AACjB,MAA+B;AAC7B,QAAM,QAAQ,QAAQ,aAAa,aAAa;AAEhD,MAAI,UAAU,MAAM;AAClB,WAAO;AAAA,EACT;AAEA,MAAI,UAAU,SAAS;AACrB,WAAO;AAAA,EACT;AAEA,SAAO,UAAU;AACnB;AAEA,MAAM,qBAAqB,CAAC;AAAA,EAC1B;AAAA,EACA;AACF,MAAmC;AACjC,QAAM,QAAQ,QAAQ,aAAa,aAAa;AAEhD,MAAI,UAAU,OAAQ,QAAO;AAC7B,MAAI,UAAU,QAAS,QAAO;AAE9B,SAAO,UAAU;AACnB;AAEA,MAAM,qBAAqB,CAAC;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AACF,MAIM;AACJ;AAAA,IACE,sBAAsB,QAAQ,QAAQ,iBAAiB,gBAAgB,yBAC7D,gBAAgB;AAAA,EAAA;AAE9B;AAEA,MAAM,2BAA2B,CAAC,UAA6C;AAC7E,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EAAA,IACD;AACJ,QAAM,mBAAmB,gBAAgB;AAAA,IACvC,GAAG;AAAA,IACH;AAAA,IACA,eAAe;AAAA,IACf;AAAA,EAAA,CACD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,SAAS;AAAA,IAC/D;AAAA,EACF;AAAA,EACA,KAAK,kBAAkB;AAAA,IACrB,aAAa,eAAe,YAAY;AAAA,EAAA,CACzC;AACH;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AttributeConverter, AttributeType } from './converters';
|
|
2
|
+
import { HasChangedFn } from './change-detection';
|
|
3
|
+
export interface ReactiveAttributeConfig<T = unknown> {
|
|
4
|
+
attribute?: string | false;
|
|
5
|
+
type?: AttributeType;
|
|
6
|
+
reflect?: boolean;
|
|
7
|
+
converter?: AttributeConverter<T>;
|
|
8
|
+
defaultValue?: T;
|
|
9
|
+
validate?: (value: T) => string | void;
|
|
10
|
+
onChange?: (host: HTMLElement, newValue: T | undefined, oldValue: T | undefined) => void;
|
|
11
|
+
hasChanged?: (newValue: T, oldValue: T) => boolean;
|
|
12
|
+
}
|
|
13
|
+
export type ReactiveAttributeMap = Record<string, ReactiveAttributeConfig>;
|
|
14
|
+
export interface ResolvedAttributeConfig {
|
|
15
|
+
propertyName: string;
|
|
16
|
+
attributeName: string | false;
|
|
17
|
+
type?: AttributeType;
|
|
18
|
+
converter: AttributeConverter;
|
|
19
|
+
reflect: boolean;
|
|
20
|
+
defaultValue: unknown;
|
|
21
|
+
validate?: (value: unknown) => string | void;
|
|
22
|
+
onChange?: (host: HTMLElement, newValue: unknown, oldValue: unknown) => void;
|
|
23
|
+
hasChanged?: HasChangedFn;
|
|
24
|
+
}
|
|
25
|
+
export declare function toAttributeName(propName: string): string;
|
|
26
|
+
export declare function defineObservedAttributes(map: ReactiveAttributeMap): string[];
|
|
27
|
+
export declare function readAttributes<T extends Record<string, unknown>>(element: Element, map: ReactiveAttributeMap): T;
|
|
28
|
+
export declare function resolveAttributeConfigs(map: ReactiveAttributeMap): ResolvedAttributeConfig[];
|
|
29
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../source/attributes/config.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,IAAI,CAAC;IAC7E,UAAU,CAAC,EAAE,YAAY,CAAC;CAC3B;AAMD,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAExD;AAMD,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,oBAAoB,GAAG,MAAM,EAAE,CAO5E;AAMD,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9D,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,oBAAoB,GACxB,CAAC,CA+BH;AAMD,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,oBAAoB,GACxB,uBAAuB,EAAE,CAuB3B"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { resolveConverter } from "./converters.js";
|
|
2
|
+
import { AttributeValidationError } from "./errors.js";
|
|
3
|
+
function toAttributeName(propName) {
|
|
4
|
+
return propName.replace(/[A-Z]/g, (ch) => `-${ch.toLowerCase()}`);
|
|
5
|
+
}
|
|
6
|
+
function defineObservedAttributes(map) {
|
|
7
|
+
return Object.entries(map).map(([prop, cfg]) => {
|
|
8
|
+
if (cfg.attribute === false) return null;
|
|
9
|
+
return cfg.attribute ?? toAttributeName(prop);
|
|
10
|
+
}).filter((n) => n !== null);
|
|
11
|
+
}
|
|
12
|
+
function readAttributes(element, map) {
|
|
13
|
+
const result = {};
|
|
14
|
+
for (const [prop, cfg] of Object.entries(map)) {
|
|
15
|
+
if (cfg.attribute === false) {
|
|
16
|
+
result[prop] = cfg.defaultValue;
|
|
17
|
+
continue;
|
|
18
|
+
}
|
|
19
|
+
const attrName = cfg.attribute ?? toAttributeName(prop);
|
|
20
|
+
const converter = cfg.converter ? resolveConverter(cfg.converter) : cfg.type ? resolveConverter(cfg.type) : resolveConverter("string");
|
|
21
|
+
const raw = element.getAttribute(attrName);
|
|
22
|
+
const converted = converter.fromAttribute(raw, attrName);
|
|
23
|
+
const value = converted !== void 0 ? converted : cfg.defaultValue;
|
|
24
|
+
if (value !== void 0 && cfg.validate) {
|
|
25
|
+
const error = cfg.validate(value);
|
|
26
|
+
if (error) {
|
|
27
|
+
throw new AttributeValidationError(attrName, error);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
result[prop] = value;
|
|
31
|
+
}
|
|
32
|
+
return result;
|
|
33
|
+
}
|
|
34
|
+
function resolveAttributeConfigs(map) {
|
|
35
|
+
return Object.entries(map).map(([prop, cfg]) => {
|
|
36
|
+
const attributeName = cfg.attribute === false ? false : cfg.attribute ?? toAttributeName(prop);
|
|
37
|
+
const converter = cfg.converter ? resolveConverter(cfg.converter) : cfg.type ? resolveConverter(cfg.type) : resolveConverter("string");
|
|
38
|
+
return {
|
|
39
|
+
propertyName: prop,
|
|
40
|
+
attributeName,
|
|
41
|
+
type: cfg.type,
|
|
42
|
+
converter,
|
|
43
|
+
reflect: cfg.reflect ?? false,
|
|
44
|
+
defaultValue: cfg.defaultValue,
|
|
45
|
+
validate: cfg.validate,
|
|
46
|
+
onChange: cfg.onChange,
|
|
47
|
+
hasChanged: cfg.hasChanged
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
export {
|
|
52
|
+
defineObservedAttributes,
|
|
53
|
+
readAttributes,
|
|
54
|
+
resolveAttributeConfigs,
|
|
55
|
+
toAttributeName
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=config.js.map
|