@universityofmaryland/web-model-library 1.0.0 → 1.0.2-beta.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.
Files changed (231) hide show
  1. package/README.md +1 -1
  2. package/dist/_virtual/___vite-browser-external.js +6 -7
  3. package/dist/_virtual/___vite-browser-external.js.map +1 -1
  4. package/dist/_virtual/__vite-browser-external.js +3 -2
  5. package/dist/_virtual/__vite-browser-external.js.map +1 -1
  6. package/dist/_virtual/_commonjsHelpers.js +4 -4
  7. package/dist/_virtual/_commonjsHelpers.js.map +1 -1
  8. package/dist/_virtual/index.js +7 -6
  9. package/dist/_virtual/index.js.map +1 -1
  10. package/dist/_virtual/picocolors.browser.js +3 -3
  11. package/dist/_virtual/picocolors.browser.js.map +1 -1
  12. package/dist/_virtual/postcss.js +7 -6
  13. package/dist/_virtual/postcss.js.map +1 -1
  14. package/dist/_virtual/symbols.js +3 -3
  15. package/dist/_virtual/symbols.js.map +1 -1
  16. package/dist/attributes/checks.d.ts +5 -6
  17. package/dist/attributes/checks.d.ts.map +1 -1
  18. package/dist/attributes/checks.js +338 -340
  19. package/dist/attributes/checks.js.map +1 -1
  20. package/dist/attributes/handler.d.ts +1 -2
  21. package/dist/attributes/handler.d.ts.map +1 -1
  22. package/dist/attributes/handler.js +20 -19
  23. package/dist/attributes/handler.js.map +1 -1
  24. package/dist/attributes/index.d.ts +4 -4
  25. package/dist/attributes/index.d.ts.map +1 -1
  26. package/dist/attributes/names.d.ts +4 -6
  27. package/dist/attributes/names.d.ts.map +1 -1
  28. package/dist/attributes/names.js +7 -8
  29. package/dist/attributes/names.js.map +1 -1
  30. package/dist/attributes/values.d.ts +13 -11
  31. package/dist/attributes/values.d.ts.map +1 -1
  32. package/dist/attributes/values.js +7 -3
  33. package/dist/attributes/values.js.map +1 -1
  34. package/dist/attributes.js +21 -22
  35. package/dist/attributes.js.map +1 -1
  36. package/dist/index.d.ts +1 -1
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +12 -12
  39. package/dist/index.js.map +1 -1
  40. package/dist/model.js +7 -7
  41. package/dist/model.js.map +1 -1
  42. package/dist/node_modules/nanoid/non-secure/index.js +3 -3
  43. package/dist/node_modules/nanoid/non-secure/index.js.map +1 -1
  44. package/dist/node_modules/picocolors/picocolors.browser.js +8 -8
  45. package/dist/node_modules/picocolors/picocolors.browser.js.map +1 -1
  46. package/dist/node_modules/postcss/lib/at-rule.js +5 -5
  47. package/dist/node_modules/postcss/lib/at-rule.js.map +1 -1
  48. package/dist/node_modules/postcss/lib/comment.js +5 -5
  49. package/dist/node_modules/postcss/lib/comment.js.map +1 -1
  50. package/dist/node_modules/postcss/lib/container.js +69 -62
  51. package/dist/node_modules/postcss/lib/container.js.map +1 -1
  52. package/dist/node_modules/postcss/lib/css-syntax-error.js +30 -19
  53. package/dist/node_modules/postcss/lib/css-syntax-error.js.map +1 -1
  54. package/dist/node_modules/postcss/lib/declaration.js +8 -8
  55. package/dist/node_modules/postcss/lib/declaration.js.map +1 -1
  56. package/dist/node_modules/postcss/lib/document.js +5 -5
  57. package/dist/node_modules/postcss/lib/document.js.map +1 -1
  58. package/dist/node_modules/postcss/lib/fromJSON.js +19 -19
  59. package/dist/node_modules/postcss/lib/fromJSON.js.map +1 -1
  60. package/dist/node_modules/postcss/lib/input.js +51 -37
  61. package/dist/node_modules/postcss/lib/input.js.map +1 -1
  62. package/dist/node_modules/postcss/lib/lazy-result.js +67 -67
  63. package/dist/node_modules/postcss/lib/lazy-result.js.map +1 -1
  64. package/dist/node_modules/postcss/lib/list.js +3 -3
  65. package/dist/node_modules/postcss/lib/list.js.map +1 -1
  66. package/dist/node_modules/postcss/lib/map-generator.js +27 -18
  67. package/dist/node_modules/postcss/lib/map-generator.js.map +1 -1
  68. package/dist/node_modules/postcss/lib/no-work-result.js +54 -51
  69. package/dist/node_modules/postcss/lib/no-work-result.js.map +1 -1
  70. package/dist/node_modules/postcss/lib/node.js +91 -38
  71. package/dist/node_modules/postcss/lib/node.js.map +1 -1
  72. package/dist/node_modules/postcss/lib/parse.js +13 -13
  73. package/dist/node_modules/postcss/lib/parse.js.map +1 -1
  74. package/dist/node_modules/postcss/lib/parser.js +21 -20
  75. package/dist/node_modules/postcss/lib/parser.js.map +1 -1
  76. package/dist/node_modules/postcss/lib/postcss.js +4 -3
  77. package/dist/node_modules/postcss/lib/postcss.js.map +1 -1
  78. package/dist/node_modules/postcss/lib/postcss2.js +43 -43
  79. package/dist/node_modules/postcss/lib/postcss2.js.map +1 -1
  80. package/dist/node_modules/postcss/lib/previous-map.js +14 -12
  81. package/dist/node_modules/postcss/lib/previous-map.js.map +1 -1
  82. package/dist/node_modules/postcss/lib/processor.js +13 -13
  83. package/dist/node_modules/postcss/lib/processor.js.map +1 -1
  84. package/dist/node_modules/postcss/lib/result.js +12 -12
  85. package/dist/node_modules/postcss/lib/result.js.map +1 -1
  86. package/dist/node_modules/postcss/lib/root.js +5 -5
  87. package/dist/node_modules/postcss/lib/root.js.map +1 -1
  88. package/dist/node_modules/postcss/lib/rule.js +13 -13
  89. package/dist/node_modules/postcss/lib/rule.js.map +1 -1
  90. package/dist/node_modules/postcss/lib/stringifier.js +3 -3
  91. package/dist/node_modules/postcss/lib/stringifier.js.map +1 -1
  92. package/dist/node_modules/postcss/lib/stringify.js +5 -5
  93. package/dist/node_modules/postcss/lib/stringify.js.map +1 -1
  94. package/dist/node_modules/postcss/lib/symbols.js +8 -8
  95. package/dist/node_modules/postcss/lib/symbols.js.map +1 -1
  96. package/dist/node_modules/postcss/lib/tokenize.js +5 -5
  97. package/dist/node_modules/postcss/lib/tokenize.js.map +1 -1
  98. package/dist/node_modules/postcss/lib/warning.js +3 -3
  99. package/dist/node_modules/postcss/lib/warning.js.map +1 -1
  100. package/dist/packages/model/node_modules/postcss-discard-duplicates/src/index.js +3 -3
  101. package/dist/packages/model/node_modules/postcss-discard-duplicates/src/index.js.map +1 -1
  102. package/dist/slots/create.js +3 -3
  103. package/dist/slots/create.js.map +1 -1
  104. package/dist/slots/element.js +3 -3
  105. package/dist/slots/element.js.map +1 -1
  106. package/dist/slots/index.d.ts +23 -16
  107. package/dist/slots/index.d.ts.map +1 -1
  108. package/dist/slots/mapping.d.ts +4 -0
  109. package/dist/slots/mapping.d.ts.map +1 -1
  110. package/dist/slots/mapping.js +8 -4
  111. package/dist/slots/mapping.js.map +1 -1
  112. package/dist/slots.d.ts +0 -4
  113. package/dist/slots.js +41 -36
  114. package/dist/slots.js.map +1 -1
  115. package/dist/utilities/index.d.ts +1 -1
  116. package/dist/utilities/index.d.ts.map +1 -1
  117. package/dist/utilities/lifecycle.js +4 -4
  118. package/dist/utilities/lifecycle.js.map +1 -1
  119. package/dist/utilities/register.js +6 -6
  120. package/dist/utilities/register.js.map +1 -1
  121. package/dist/utilities/styles.d.ts +1 -2
  122. package/dist/utilities/styles.d.ts.map +1 -1
  123. package/dist/utilities/styles.js +15 -10
  124. package/dist/utilities/styles.js.map +1 -1
  125. package/dist/utilities.js +10 -10
  126. package/dist/utilities.js.map +1 -1
  127. package/package.json +13 -12
  128. package/dist/_virtual/___vite-browser-external.mjs +0 -7
  129. package/dist/_virtual/___vite-browser-external.mjs.map +0 -1
  130. package/dist/_virtual/__vite-browser-external.mjs +0 -5
  131. package/dist/_virtual/__vite-browser-external.mjs.map +0 -1
  132. package/dist/_virtual/_commonjsHelpers.mjs +0 -37
  133. package/dist/_virtual/_commonjsHelpers.mjs.map +0 -1
  134. package/dist/_virtual/index.mjs +0 -8
  135. package/dist/_virtual/index.mjs.map +0 -1
  136. package/dist/_virtual/picocolors.browser.mjs +0 -5
  137. package/dist/_virtual/picocolors.browser.mjs.map +0 -1
  138. package/dist/_virtual/postcss.mjs +0 -8
  139. package/dist/_virtual/postcss.mjs.map +0 -1
  140. package/dist/_virtual/symbols.mjs +0 -5
  141. package/dist/_virtual/symbols.mjs.map +0 -1
  142. package/dist/attributes/checks.mjs +0 -740
  143. package/dist/attributes/checks.mjs.map +0 -1
  144. package/dist/attributes/handler.mjs +0 -206
  145. package/dist/attributes/handler.mjs.map +0 -1
  146. package/dist/attributes/names.mjs +0 -146
  147. package/dist/attributes/names.mjs.map +0 -1
  148. package/dist/attributes/values.mjs +0 -81
  149. package/dist/attributes/values.mjs.map +0 -1
  150. package/dist/attributes.mjs +0 -23
  151. package/dist/attributes.mjs.map +0 -1
  152. package/dist/index.mjs +0 -13
  153. package/dist/index.mjs.map +0 -1
  154. package/dist/model.mjs +0 -259
  155. package/dist/model.mjs.map +0 -1
  156. package/dist/node_modules/nanoid/non-secure/index.mjs +0 -31
  157. package/dist/node_modules/nanoid/non-secure/index.mjs.map +0 -1
  158. package/dist/node_modules/picocolors/picocolors.browser.mjs +0 -17
  159. package/dist/node_modules/picocolors/picocolors.browser.mjs.map +0 -1
  160. package/dist/node_modules/postcss/lib/at-rule.mjs +0 -30
  161. package/dist/node_modules/postcss/lib/at-rule.mjs.map +0 -1
  162. package/dist/node_modules/postcss/lib/comment.mjs +0 -21
  163. package/dist/node_modules/postcss/lib/comment.mjs.map +0 -1
  164. package/dist/node_modules/postcss/lib/container.mjs +0 -383
  165. package/dist/node_modules/postcss/lib/container.mjs.map +0 -1
  166. package/dist/node_modules/postcss/lib/css-syntax-error.mjs +0 -92
  167. package/dist/node_modules/postcss/lib/css-syntax-error.mjs.map +0 -1
  168. package/dist/node_modules/postcss/lib/declaration.mjs +0 -27
  169. package/dist/node_modules/postcss/lib/declaration.mjs.map +0 -1
  170. package/dist/node_modules/postcss/lib/document.mjs +0 -34
  171. package/dist/node_modules/postcss/lib/document.mjs.map +0 -1
  172. package/dist/node_modules/postcss/lib/fromJSON.mjs +0 -67
  173. package/dist/node_modules/postcss/lib/fromJSON.mjs.map +0 -1
  174. package/dist/node_modules/postcss/lib/input.mjs +0 -216
  175. package/dist/node_modules/postcss/lib/input.mjs.map +0 -1
  176. package/dist/node_modules/postcss/lib/lazy-result.mjs +0 -467
  177. package/dist/node_modules/postcss/lib/lazy-result.mjs.map +0 -1
  178. package/dist/node_modules/postcss/lib/list.mjs +0 -60
  179. package/dist/node_modules/postcss/lib/list.mjs.map +0 -1
  180. package/dist/node_modules/postcss/lib/map-generator.mjs +0 -314
  181. package/dist/node_modules/postcss/lib/map-generator.mjs.map +0 -1
  182. package/dist/node_modules/postcss/lib/no-work-result.mjs +0 -113
  183. package/dist/node_modules/postcss/lib/no-work-result.mjs.map +0 -1
  184. package/dist/node_modules/postcss/lib/node.mjs +0 -335
  185. package/dist/node_modules/postcss/lib/node.mjs.map +0 -1
  186. package/dist/node_modules/postcss/lib/parse.mjs +0 -30
  187. package/dist/node_modules/postcss/lib/parse.mjs.map +0 -1
  188. package/dist/node_modules/postcss/lib/parser.mjs +0 -543
  189. package/dist/node_modules/postcss/lib/parser.mjs.map +0 -1
  190. package/dist/node_modules/postcss/lib/postcss.mjs +0 -29
  191. package/dist/node_modules/postcss/lib/postcss.mjs.map +0 -1
  192. package/dist/node_modules/postcss/lib/postcss2.mjs +0 -110
  193. package/dist/node_modules/postcss/lib/postcss2.mjs.map +0 -1
  194. package/dist/node_modules/postcss/lib/previous-map.mjs +0 -123
  195. package/dist/node_modules/postcss/lib/previous-map.mjs.map +0 -1
  196. package/dist/node_modules/postcss/lib/processor.mjs +0 -61
  197. package/dist/node_modules/postcss/lib/processor.mjs.map +0 -1
  198. package/dist/node_modules/postcss/lib/result.mjs +0 -44
  199. package/dist/node_modules/postcss/lib/result.mjs.map +0 -1
  200. package/dist/node_modules/postcss/lib/root.mjs +0 -58
  201. package/dist/node_modules/postcss/lib/root.mjs.map +0 -1
  202. package/dist/node_modules/postcss/lib/rule.mjs +0 -33
  203. package/dist/node_modules/postcss/lib/rule.mjs.map +0 -1
  204. package/dist/node_modules/postcss/lib/stringifier.mjs +0 -308
  205. package/dist/node_modules/postcss/lib/stringifier.mjs.map +0 -1
  206. package/dist/node_modules/postcss/lib/stringify.mjs +0 -19
  207. package/dist/node_modules/postcss/lib/stringify.mjs.map +0 -1
  208. package/dist/node_modules/postcss/lib/symbols.mjs +0 -13
  209. package/dist/node_modules/postcss/lib/symbols.mjs.map +0 -1
  210. package/dist/node_modules/postcss/lib/tokenize.mjs +0 -219
  211. package/dist/node_modules/postcss/lib/tokenize.mjs.map +0 -1
  212. package/dist/node_modules/postcss/lib/warning.mjs +0 -40
  213. package/dist/node_modules/postcss/lib/warning.mjs.map +0 -1
  214. package/dist/packages/model/node_modules/postcss-discard-duplicates/src/index.mjs +0 -130
  215. package/dist/packages/model/node_modules/postcss-discard-duplicates/src/index.mjs.map +0 -1
  216. package/dist/slots/create.mjs +0 -50
  217. package/dist/slots/create.mjs.map +0 -1
  218. package/dist/slots/element.mjs +0 -42
  219. package/dist/slots/element.mjs.map +0 -1
  220. package/dist/slots/mapping.mjs +0 -97
  221. package/dist/slots/mapping.mjs.map +0 -1
  222. package/dist/slots.mjs +0 -74
  223. package/dist/slots.mjs.map +0 -1
  224. package/dist/utilities/lifecycle.mjs +0 -21
  225. package/dist/utilities/lifecycle.mjs.map +0 -1
  226. package/dist/utilities/register.mjs +0 -32
  227. package/dist/utilities/register.mjs.map +0 -1
  228. package/dist/utilities/styles.mjs +0 -80
  229. package/dist/utilities/styles.mjs.map +0 -1
  230. package/dist/utilities.mjs +0 -11
  231. package/dist/utilities.mjs.map +0 -1
@@ -1,740 +0,0 @@
1
- import * as Styles from "@universityofmaryland/web-styles-library";
2
- import AttributeNames from "./names.mjs";
3
- import AttributeValues from "./values.mjs";
4
- const isAttributeTrue = ({
5
- element,
6
- attributeName,
7
- attributeValue,
8
- defaultValue = false
9
- }) => {
10
- const value = element.getAttribute(attributeName);
11
- if (value === null) {
12
- return defaultValue;
13
- }
14
- if (value === "false") {
15
- return false;
16
- }
17
- return value === attributeValue;
18
- };
19
- const isAttributeNotNull = ({
20
- element,
21
- attributeName
22
- }) => {
23
- const value = element.getAttribute(attributeName);
24
- if (value === "true") return true;
25
- if (value === "false") return false;
26
- return value !== null;
27
- };
28
- const depcreationWarning = ({
29
- element,
30
- attributeNameOld,
31
- attributeNameNew
32
- }) => {
33
- console.warn(
34
- `UMD Web Component: ${element.nodeName} - Attribute "${attributeNameOld}" is deprecated. Use "${attributeNameNew}" instead. This attribute will be removed in version 2.0.`
35
- );
36
- };
37
- const checkDeprecatedAttribute = (props) => {
38
- const {
39
- element,
40
- attributeNameOld,
41
- attributeNameNew,
42
- attributeValue,
43
- ...rest
44
- } = props;
45
- const isDeprecatedUsed = isAttributeTrue({
46
- ...rest,
47
- element,
48
- attributeName: attributeNameOld,
49
- attributeValue
50
- });
51
- if (isDeprecatedUsed) {
52
- depcreationWarning(props);
53
- return true;
54
- }
55
- return false;
56
- };
57
- const createAttributeCheck = (attributeName, attributeValue, defaultValue = false) => (props) => isAttributeTrue({
58
- ...props,
59
- attributeName,
60
- attributeValue,
61
- defaultValue
62
- });
63
- const createValueGetter = ({
64
- currentName,
65
- deprecatedName
66
- }) => {
67
- return ({ element }) => {
68
- if (deprecatedName) {
69
- const deprecatedValue = element.getAttribute(deprecatedName);
70
- if (deprecatedValue !== null) {
71
- depcreationWarning({
72
- element,
73
- attributeNameOld: deprecatedName,
74
- attributeNameNew: currentName
75
- });
76
- return deprecatedValue;
77
- }
78
- }
79
- const value = element.getAttribute(currentName);
80
- if (value !== null) {
81
- return value;
82
- }
83
- return null;
84
- };
85
- };
86
- const hasInfo = {
87
- gifts: (props) => isAttributeNotNull({
88
- ...props,
89
- attributeName: AttributeNames.information.gift
90
- }),
91
- search: (props) => isAttributeNotNull({
92
- ...props,
93
- attributeName: AttributeNames.information.search
94
- })
95
- };
96
- const hasDecoration = {
97
- line: (props) => checkDeprecatedAttribute({
98
- ...props,
99
- attributeNameOld: AttributeNames.deprecated.option.OPTIONAL_HAS_LINE,
100
- attributeNameNew: AttributeNames.decoration.line,
101
- attributeValue: ""
102
- }) || isAttributeNotNull({
103
- ...props,
104
- attributeName: AttributeNames.decoration.line
105
- })
106
- };
107
- const includesFeature = {
108
- animation: createAttributeCheck(
109
- AttributeNames.feature.animation,
110
- AttributeValues.state.TRUE,
111
- true
112
- ),
113
- imageExpand: createAttributeCheck(
114
- AttributeNames.feature.imageExpand,
115
- AttributeValues.state.TRUE,
116
- true
117
- ),
118
- fullScreenOption: createAttributeCheck(
119
- AttributeNames.deprecated.feature.FULLSCREEN,
120
- AttributeValues.state.TRUE,
121
- true
122
- ),
123
- visualTime: createAttributeCheck(
124
- AttributeNames.deprecated.feature.SHOW_TIME,
125
- AttributeValues.state.TRUE,
126
- true
127
- ),
128
- lazyLoad: (props) => checkDeprecatedAttribute({
129
- ...props,
130
- attributeNameOld: AttributeNames.deprecated.feed.FEED_LAZY_LOAD,
131
- attributeNameNew: AttributeNames.feature.lazyLoad,
132
- attributeValue: AttributeValues.state.TRUE
133
- }) || isAttributeTrue({
134
- ...props,
135
- attributeName: AttributeNames.feature.lazyLoad,
136
- attributeValue: AttributeValues.state.TRUE
137
- })
138
- };
139
- const isData = {
140
- type: {
141
- academic: (props) => checkDeprecatedAttribute({
142
- ...props,
143
- attributeNameOld: AttributeNames.deprecated.type.TYPE,
144
- attributeNameNew: AttributeNames.feed.type,
145
- attributeValue: AttributeValues.data.type.academic
146
- }) || isAttributeTrue({
147
- ...props,
148
- attributeName: AttributeNames.feed.type,
149
- attributeValue: AttributeValues.data.type.academic
150
- })
151
- },
152
- union: createAttributeCheck(
153
- AttributeNames.deprecated.feed.FEED_UNION,
154
- AttributeValues.state.FALSE,
155
- true
156
- )
157
- };
158
- const isDisplay = {
159
- block: (props) => checkDeprecatedAttribute({
160
- ...props,
161
- attributeNameOld: AttributeNames.deprecated.display.DISPLAY_TYPE,
162
- attributeNameNew: AttributeNames.display.default,
163
- attributeValue: AttributeValues.display.block
164
- }) || isAttributeTrue({
165
- ...props,
166
- attributeName: AttributeNames.display.default,
167
- attributeValue: AttributeValues.display.block
168
- }),
169
- feature: createAttributeCheck(
170
- AttributeNames.deprecated.display.DISPLAY,
171
- AttributeValues.display.feature
172
- ),
173
- featured: (props) => checkDeprecatedAttribute({
174
- ...props,
175
- attributeNameOld: AttributeNames.deprecated.type.TYPE,
176
- attributeNameNew: AttributeNames.display.default,
177
- attributeValue: AttributeValues.display.featured
178
- }) || isAttributeTrue({
179
- ...props,
180
- attributeName: AttributeNames.display.default,
181
- attributeValue: AttributeValues.display.featured
182
- }),
183
- hero: (props) => checkDeprecatedAttribute({
184
- ...props,
185
- attributeNameOld: AttributeNames.deprecated.type.TYPE,
186
- attributeNameNew: AttributeNames.display.default,
187
- attributeValue: AttributeValues.display.hero
188
- }) || isAttributeTrue({
189
- ...props,
190
- attributeName: AttributeNames.display.default,
191
- attributeValue: AttributeValues.display.hero
192
- }),
193
- list: (props) => checkDeprecatedAttribute({
194
- ...props,
195
- attributeNameOld: AttributeNames.deprecated.display.DISPLAY,
196
- attributeNameNew: AttributeNames.display.default,
197
- attributeValue: AttributeValues.display.list
198
- }) || isAttributeTrue({
199
- ...props,
200
- attributeName: AttributeNames.display.default,
201
- attributeValue: AttributeValues.display.list
202
- }),
203
- outline: (props) => checkDeprecatedAttribute({
204
- ...props,
205
- attributeNameOld: AttributeNames.deprecated.type.TYPE,
206
- attributeNameNew: AttributeNames.display.default,
207
- attributeValue: AttributeValues.type.OUTLINE
208
- }) || isAttributeTrue({
209
- ...props,
210
- attributeName: AttributeNames.display.default,
211
- attributeValue: AttributeValues.type.OUTLINE
212
- }),
213
- overlay: (props) => checkDeprecatedAttribute({
214
- ...props,
215
- attributeNameOld: AttributeNames.deprecated.type.TYPE,
216
- attributeNameNew: AttributeNames.display.default,
217
- attributeValue: AttributeValues.display.overlay
218
- }) || isAttributeTrue({
219
- ...props,
220
- attributeName: AttributeNames.display.default,
221
- attributeValue: AttributeValues.display.overlay
222
- }),
223
- promo: createAttributeCheck(
224
- AttributeNames.deprecated.display.DISPLAY,
225
- AttributeValues.display.promo
226
- ),
227
- primary: (props) => checkDeprecatedAttribute({
228
- ...props,
229
- attributeNameOld: AttributeNames.deprecated.type.TYPE,
230
- attributeNameNew: AttributeNames.display.default,
231
- attributeValue: AttributeValues.type.PRIMARY
232
- }) || isAttributeTrue({
233
- ...props,
234
- attributeName: AttributeNames.display.default,
235
- attributeValue: AttributeValues.type.PRIMARY
236
- }),
237
- secondary: (props) => checkDeprecatedAttribute({
238
- ...props,
239
- attributeNameOld: AttributeNames.deprecated.type.TYPE,
240
- attributeNameNew: AttributeNames.display.default,
241
- attributeValue: AttributeValues.type.SECONDARY
242
- }) || isAttributeTrue({
243
- ...props,
244
- attributeName: AttributeNames.display.default,
245
- attributeValue: AttributeValues.type.SECONDARY
246
- }),
247
- short: createAttributeCheck(
248
- AttributeNames.display.default,
249
- AttributeValues.display.short
250
- ),
251
- standardCentered: (props) => checkDeprecatedAttribute({
252
- ...props,
253
- attributeNameOld: AttributeNames.deprecated.type.TYPE,
254
- attributeNameNew: AttributeNames.display.default,
255
- attributeValue: AttributeValues.layout.defaultCentered
256
- }) || isAttributeTrue({
257
- ...props,
258
- attributeName: AttributeNames.deprecated.type.TYPE,
259
- attributeValue: AttributeValues.layout.defaultCentered
260
- }),
261
- standardInterior: (props) => checkDeprecatedAttribute({
262
- ...props,
263
- attributeNameOld: AttributeNames.deprecated.type.TYPE,
264
- attributeNameNew: AttributeNames.display.default,
265
- attributeValue: AttributeValues.layout.defaultInterior
266
- }) || isAttributeTrue({
267
- ...props,
268
- attributeName: AttributeNames.deprecated.type.TYPE,
269
- attributeValue: AttributeValues.layout.defaultInterior
270
- }),
271
- standardInteriorCentered: (props) => checkDeprecatedAttribute({
272
- ...props,
273
- attributeNameOld: AttributeNames.deprecated.type.TYPE,
274
- attributeNameNew: AttributeNames.display.default,
275
- attributeValue: AttributeValues.layout.defaultInteriorCentered
276
- }) || isAttributeTrue({
277
- ...props,
278
- attributeName: AttributeNames.deprecated.type.TYPE,
279
- attributeValue: AttributeValues.layout.defaultInteriorCentered
280
- }),
281
- statement: createAttributeCheck(
282
- AttributeNames.deprecated.display.DISPLAY,
283
- AttributeValues.display.statement
284
- ),
285
- sticky: (props) => checkDeprecatedAttribute({
286
- ...props,
287
- attributeNameOld: AttributeNames.deprecated.type.TYPE,
288
- attributeNameNew: AttributeNames.display.default,
289
- attributeValue: AttributeValues.display.sticky
290
- }) || isAttributeTrue({
291
- ...props,
292
- attributeName: AttributeNames.display.default,
293
- attributeValue: AttributeValues.display.sticky
294
- }),
295
- stacked: (props) => checkDeprecatedAttribute({
296
- ...props,
297
- attributeNameOld: AttributeNames.deprecated.type.TYPE,
298
- attributeNameNew: AttributeNames.display.default,
299
- attributeValue: AttributeValues.display.stacked
300
- }) || isAttributeTrue({
301
- ...props,
302
- attributeName: AttributeNames.display.default,
303
- attributeValue: AttributeValues.display.stacked
304
- }),
305
- stackedInteriorDeprecated: createAttributeCheck(
306
- AttributeNames.deprecated.type.TYPE,
307
- AttributeValues.layout.stackedInterior
308
- ),
309
- stackedInterior: (props) => checkDeprecatedAttribute({
310
- ...props,
311
- attributeNameOld: AttributeNames.deprecated.type.TYPE,
312
- attributeNameNew: AttributeNames.display.default,
313
- attributeValue: AttributeValues.layout.stackedInterior
314
- }) || isAttributeTrue({
315
- ...props,
316
- attributeName: AttributeNames.display.default,
317
- attributeValue: AttributeValues.layout.stackedInterior
318
- }),
319
- tabular: (props) => checkDeprecatedAttribute({
320
- ...props,
321
- attributeNameOld: AttributeNames.deprecated.display.DISPLAY,
322
- attributeNameNew: AttributeNames.display.default,
323
- attributeValue: AttributeValues.display.tabular
324
- }) || isAttributeTrue({
325
- ...props,
326
- attributeName: AttributeNames.display.default,
327
- attributeValue: AttributeValues.display.tabular
328
- })
329
- };
330
- const isInfo = {
331
- admissions: createAttributeCheck(
332
- AttributeNames.information.admissions,
333
- AttributeValues.state.TRUE
334
- ),
335
- events: createAttributeCheck(
336
- AttributeNames.information.events,
337
- AttributeValues.state.TRUE
338
- ),
339
- news: createAttributeCheck(
340
- AttributeNames.information.news,
341
- AttributeValues.state.TRUE
342
- ),
343
- schools: createAttributeCheck(
344
- AttributeNames.information.schools,
345
- AttributeValues.state.TRUE
346
- ),
347
- searchDomain: createAttributeCheck(
348
- AttributeNames.information.searchType,
349
- AttributeValues.search.domain
350
- )
351
- };
352
- const isLayout = {
353
- alertOff: createAttributeCheck(
354
- AttributeNames.layout.alertOff,
355
- AttributeValues.state.TRUE
356
- ),
357
- alignmentRight: (props) => checkDeprecatedAttribute({
358
- ...props,
359
- attributeNameOld: AttributeNames.deprecated.layout.LAYOUT_ALIGNMENT,
360
- attributeNameNew: AttributeNames.layout.alignment,
361
- attributeValue: AttributeValues.layout.right
362
- }) || isAttributeTrue({
363
- ...props,
364
- attributeName: AttributeNames.layout.alignment,
365
- attributeValue: AttributeValues.layout.right
366
- }),
367
- fixed: (props) => checkDeprecatedAttribute({
368
- ...props,
369
- attributeNameOld: AttributeNames.deprecated.layout.LAYOUT_FIXED,
370
- attributeNameNew: AttributeNames.layout.fixed,
371
- attributeValue: ""
372
- }) || isAttributeTrue({
373
- ...props,
374
- attributeName: AttributeNames.layout.fixed,
375
- attributeValue: AttributeValues.state.TRUE
376
- }),
377
- fullImage: createAttributeCheck(
378
- AttributeNames.deprecated.type.TYPE,
379
- AttributeValues.layout.fullImage
380
- ),
381
- heightSmall: (props) => isAttributeTrue({
382
- ...props,
383
- attributeName: AttributeNames.layout.height,
384
- attributeValue: AttributeValues.layout.small
385
- }),
386
- hidden: createAttributeCheck(
387
- AttributeNames.layout.hidden,
388
- AttributeValues.state.TRUE
389
- ),
390
- image: createAttributeCheck(
391
- AttributeNames.deprecated.type.TYPE,
392
- AttributeValues.display.image
393
- ),
394
- imagePositionRight: (props) => checkDeprecatedAttribute({
395
- ...props,
396
- attributeNameOld: AttributeNames.deprecated.layout.LAYOUT_IMAGE_POSITION,
397
- attributeNameNew: AttributeNames.layout.imagePosition,
398
- attributeValue: AttributeValues.layout.right
399
- }) || isAttributeTrue({
400
- ...props,
401
- attributeName: AttributeNames.layout.imagePosition,
402
- attributeValue: AttributeValues.layout.right,
403
- defaultValue: true
404
- }),
405
- imagePositionLeft: (props) => checkDeprecatedAttribute({
406
- ...props,
407
- attributeNameOld: AttributeNames.deprecated.layout.LAYOUT_IMAGE_POSITION,
408
- attributeNameNew: AttributeNames.layout.imagePosition,
409
- attributeValue: AttributeValues.layout.left
410
- }) || isAttributeTrue({
411
- ...props,
412
- attributeName: AttributeNames.layout.imagePosition,
413
- attributeValue: AttributeValues.layout.left,
414
- defaultValue: false
415
- }),
416
- imageScaled: (props) => isAttributeTrue({
417
- ...props,
418
- attributeName: AttributeNames.layout.imageScaled,
419
- attributeValue: AttributeValues.state.TRUE,
420
- defaultValue: true
421
- }),
422
- interior: createAttributeCheck(
423
- AttributeNames.layout.interior,
424
- AttributeValues.state.TRUE
425
- ),
426
- lock: createAttributeCheck(
427
- AttributeNames.layout.lock,
428
- AttributeValues.state.TRUE
429
- ),
430
- lockFull: createAttributeCheck(
431
- AttributeNames.layout.lock,
432
- AttributeValues.layout.large
433
- ),
434
- reverse: (props) => checkDeprecatedAttribute({
435
- ...props,
436
- attributeNameOld: AttributeNames.deprecated.layout.DEFAULT,
437
- attributeNameNew: AttributeNames.layout.reverse,
438
- attributeValue: AttributeValues.state.TRUE
439
- }) || isAttributeTrue({
440
- ...props,
441
- attributeName: AttributeNames.layout.reverse,
442
- attributeValue: AttributeValues.state.TRUE
443
- }),
444
- spaceHorizontalLarge: (props) => isAttributeTrue({
445
- ...props,
446
- attributeName: AttributeNames.layout.spaceHorizontal,
447
- attributeValue: AttributeValues.layout.large
448
- }),
449
- textCentered: (props) => checkDeprecatedAttribute({
450
- ...props,
451
- attributeNameOld: AttributeNames.deprecated.visual.VISUAL_TEXT_CENTER,
452
- attributeNameNew: AttributeNames.layout.text,
453
- attributeValue: AttributeValues.layout.center
454
- }) || isAttributeTrue({
455
- ...props,
456
- attributeName: AttributeNames.layout.text,
457
- attributeValue: AttributeValues.layout.center
458
- })
459
- };
460
- const isSharing = {
461
- email: createAttributeCheck(
462
- AttributeNames.sharing.email,
463
- AttributeValues.state.TRUE
464
- ),
465
- print: createAttributeCheck(
466
- AttributeNames.sharing.print,
467
- AttributeValues.state.TRUE
468
- )
469
- };
470
- const includesSharing = {
471
- facebook: createAttributeCheck(
472
- AttributeNames.social.facebook,
473
- AttributeValues.state.TRUE,
474
- true
475
- ),
476
- twitter: createAttributeCheck(
477
- AttributeNames.social.twitter,
478
- AttributeValues.state.TRUE,
479
- true
480
- )
481
- };
482
- const isTheme = {
483
- dark: (props) => checkDeprecatedAttribute({
484
- ...props,
485
- attributeNameOld: AttributeNames.deprecated.theme.THEME_DEPRECATD,
486
- attributeNameNew: AttributeNames.theme.default,
487
- attributeValue: AttributeValues.theme.DARK
488
- }) || isAttributeTrue({
489
- ...props,
490
- attributeName: AttributeNames.theme.default,
491
- attributeValue: AttributeValues.theme.DARK
492
- }),
493
- gold: (props) => checkDeprecatedAttribute({
494
- ...props,
495
- attributeNameOld: AttributeNames.deprecated.theme.THEME_DEPRECATD,
496
- attributeNameNew: AttributeNames.theme.default,
497
- attributeValue: AttributeValues.theme.GOLD
498
- }) || isAttributeTrue({
499
- ...props,
500
- attributeName: AttributeNames.theme.default,
501
- attributeValue: AttributeValues.theme.GOLD
502
- }),
503
- light: (props) => checkDeprecatedAttribute({
504
- ...props,
505
- attributeNameOld: AttributeNames.deprecated.theme.THEME_DEPRECATD,
506
- attributeNameNew: AttributeNames.theme.default,
507
- attributeValue: AttributeValues.theme.LIGHT
508
- }) || isAttributeTrue({
509
- ...props,
510
- attributeName: AttributeNames.theme.default,
511
- attributeValue: AttributeValues.theme.LIGHT
512
- }),
513
- maryland: (props) => checkDeprecatedAttribute({
514
- ...props,
515
- attributeNameOld: AttributeNames.deprecated.theme.THEME_DEPRECATD,
516
- attributeNameNew: AttributeNames.theme.default,
517
- attributeValue: AttributeValues.theme.MARYLAND
518
- }) || isAttributeTrue({
519
- ...props,
520
- attributeName: AttributeNames.theme.default,
521
- attributeValue: AttributeValues.theme.MARYLAND
522
- })
523
- };
524
- const isVisual = {
525
- aligned: (props) => checkDeprecatedAttribute({
526
- ...props,
527
- attributeNameOld: AttributeNames.deprecated.visual.VISUAL_ALIGN,
528
- attributeNameNew: AttributeNames.visual.imageAligned,
529
- attributeValue: AttributeValues.state.TRUE
530
- }) || isAttributeTrue({
531
- ...props,
532
- attributeName: AttributeNames.visual.imageAligned,
533
- attributeValue: AttributeValues.state.TRUE
534
- }),
535
- bordered: (props) => checkDeprecatedAttribute({
536
- ...props,
537
- attributeNameOld: AttributeNames.deprecated.visual.VISUAL_BORDER,
538
- attributeNameNew: AttributeNames.visual.bordered,
539
- attributeValue: AttributeValues.state.TRUE
540
- }) || isAttributeTrue({
541
- ...props,
542
- attributeName: AttributeNames.visual.bordered,
543
- attributeValue: AttributeValues.state.TRUE
544
- }),
545
- campaign: createAttributeCheck(
546
- AttributeNames.visual.campaign,
547
- AttributeValues.campaign.forward
548
- ),
549
- icon_seal: (props) => checkDeprecatedAttribute({
550
- ...props,
551
- attributeNameOld: AttributeNames.deprecated.visual.VISUAL_HAS_LOGO,
552
- attributeNameNew: AttributeNames.visual.iconSeal,
553
- attributeValue: AttributeValues.state.TRUE
554
- }) || isAttributeTrue({
555
- ...props,
556
- attributeName: AttributeNames.visual.iconSeal,
557
- attributeValue: AttributeValues.state.TRUE
558
- }),
559
- open: (props) => checkDeprecatedAttribute({
560
- ...props,
561
- attributeNameOld: AttributeNames.deprecated.state.STATE_DEPRECATD,
562
- attributeNameNew: AttributeNames.visual.open,
563
- attributeValue: AttributeValues.state.OPENED
564
- }) || isAttributeTrue({
565
- ...props,
566
- attributeName: AttributeNames.visual.open,
567
- attributeValue: AttributeValues.state.TRUE
568
- }),
569
- play: createAttributeCheck(
570
- AttributeNames.visual.play,
571
- AttributeValues.state.TRUE
572
- ),
573
- quote: createAttributeCheck(
574
- AttributeNames.deprecated.visual.VISUAL_QUOTE,
575
- AttributeValues.state.TRUE
576
- ),
577
- showIcon: (props) => checkDeprecatedAttribute({
578
- ...props,
579
- attributeNameOld: AttributeNames.deprecated.visual.VISUAL_ICON,
580
- attributeNameNew: AttributeNames.visual.icon,
581
- attributeValue: AttributeValues.state.TRUE
582
- }) || isAttributeTrue({
583
- ...props,
584
- attributeName: AttributeNames.visual.icon,
585
- attributeValue: AttributeValues.state.TRUE
586
- }),
587
- sizeNormal: (props) => checkDeprecatedAttribute({
588
- ...props,
589
- attributeNameOld: AttributeNames.deprecated.display.DISPLAY_SIZE,
590
- attributeNameNew: AttributeNames.visual.size,
591
- attributeValue: AttributeValues.size.NORMAL
592
- }) || isAttributeTrue({
593
- ...props,
594
- attributeName: AttributeNames.visual.size,
595
- attributeValue: AttributeValues.size.NORMAL
596
- }),
597
- showTime: (props) => checkDeprecatedAttribute({
598
- ...props,
599
- attributeNameOld: AttributeNames.deprecated.feature.SHOW_TIME,
600
- attributeNameNew: AttributeNames.visual.time,
601
- attributeValue: AttributeValues.state.TRUE
602
- }) || isAttributeTrue({
603
- ...props,
604
- attributeName: AttributeNames.visual.time,
605
- attributeValue: AttributeValues.state.TRUE,
606
- defaultValue: true
607
- }),
608
- sizeLarge: (props) => checkDeprecatedAttribute({
609
- ...props,
610
- attributeNameOld: AttributeNames.deprecated.display.DISPLAY_SIZE,
611
- attributeNameNew: AttributeNames.visual.size,
612
- attributeValue: AttributeValues.size.LARGE
613
- }) || checkDeprecatedAttribute({
614
- ...props,
615
- attributeNameOld: AttributeNames.deprecated.display.DISPLAY_SIZE,
616
- attributeNameNew: AttributeNames.visual.size,
617
- attributeValue: ""
618
- }) || isAttributeTrue({
619
- ...props,
620
- attributeName: AttributeNames.visual.size,
621
- attributeValue: AttributeValues.size.LARGE
622
- }),
623
- stickyFirst: createAttributeCheck(
624
- AttributeNames.deprecated.option.OPTIONAL_STICKY_FIRST,
625
- AttributeValues.state.TRUE,
626
- true
627
- ),
628
- transparent: (props) => checkDeprecatedAttribute({
629
- ...props,
630
- attributeNameOld: AttributeNames.deprecated.visual.VISUAL_TRANSPARENT,
631
- attributeNameNew: AttributeNames.visual.transparent,
632
- attributeValue: AttributeValues.state.TRUE
633
- }) || isAttributeTrue({
634
- ...props,
635
- attributeName: AttributeNames.visual.transparent,
636
- attributeValue: AttributeValues.state.TRUE
637
- })
638
- };
639
- const isType = {
640
- mega: (props) => checkDeprecatedAttribute({
641
- ...props,
642
- attributeNameOld: AttributeNames.deprecated.type.TYPE,
643
- attributeNameNew: AttributeNames.type.default,
644
- attributeValue: AttributeValues.type.MEGA
645
- }) || isAttributeTrue({
646
- ...props,
647
- attributeName: AttributeNames.type.default,
648
- attributeValue: AttributeValues.type.MEGA
649
- }),
650
- visual: (props) => checkDeprecatedAttribute({
651
- ...props,
652
- attributeNameOld: AttributeNames.deprecated.type.TYPE,
653
- attributeNameNew: AttributeNames.type.default,
654
- attributeValue: AttributeValues.type.VISUAL
655
- }) || isAttributeTrue({
656
- ...props,
657
- attributeName: AttributeNames.type.default,
658
- attributeValue: AttributeValues.type.VISUAL
659
- }),
660
- simple: (props) => checkDeprecatedAttribute({
661
- ...props,
662
- attributeNameOld: AttributeNames.deprecated.type.TYPE,
663
- attributeNameNew: AttributeNames.type.default,
664
- attributeValue: AttributeValues.type.SIMPLE
665
- }) || isAttributeTrue({
666
- ...props,
667
- attributeName: AttributeNames.type.default,
668
- attributeValue: AttributeValues.type.SIMPLE
669
- })
670
- };
671
- const getValue = {
672
- alertUrl: createValueGetter({
673
- currentName: AttributeNames.information.alertUrl
674
- }),
675
- daysToHide: createValueGetter({
676
- currentName: AttributeNames.visual.hiddenDays,
677
- deprecatedName: AttributeNames.deprecated.visual.VISUAL_DAYS_TO_HIDE
678
- }),
679
- feedEntryRemoveIds: createValueGetter({
680
- currentName: AttributeNames.information.removeIds,
681
- deprecatedName: AttributeNames.deprecated.feed.FEED_NOT_ENTRIES
682
- }),
683
- feedFilterIds: createValueGetter({
684
- currentName: AttributeNames.information.filterIds,
685
- deprecatedName: AttributeNames.deprecated.feed.FEED_CATEGORIES
686
- }),
687
- feedToken: createValueGetter({
688
- currentName: AttributeNames.information.token,
689
- deprecatedName: AttributeNames.deprecated.feed.FEED_TOKEN
690
- }),
691
- giftUrl: createValueGetter({
692
- currentName: AttributeNames.information.gift
693
- }),
694
- layoutColumnCount: createValueGetter({
695
- currentName: AttributeNames.layout.columnCount,
696
- deprecatedName: AttributeNames.deprecated.feed.FEED_COLUMN_COUNT
697
- }),
698
- layoutLock: createValueGetter({
699
- currentName: AttributeNames.layout.lock
700
- }),
701
- layoutRowCount: createValueGetter({
702
- currentName: AttributeNames.layout.rowCount,
703
- deprecatedName: AttributeNames.deprecated.feed.FEED_ROW_COUNT
704
- }),
705
- title: createValueGetter({
706
- currentName: AttributeNames.information.title
707
- }),
708
- topPosition: createValueGetter({
709
- currentName: AttributeNames.layout.position,
710
- deprecatedName: AttributeNames.deprecated.layout.LAYOUT_STICKY_TOP
711
- }),
712
- styleProps: (props) => {
713
- const cssString = createValueGetter({
714
- ...props,
715
- currentName: AttributeNames.deprecated.visual.VISUAL_STYLE_PROPS
716
- });
717
- if (cssString && typeof cssString === "string") {
718
- return Styles.utilities.create.jss.objectFromString(cssString);
719
- }
720
- },
721
- url: createValueGetter({
722
- currentName: AttributeNames.information.url
723
- })
724
- };
725
- export {
726
- getValue,
727
- hasDecoration,
728
- hasInfo,
729
- includesFeature,
730
- includesSharing,
731
- isData,
732
- isDisplay,
733
- isInfo,
734
- isLayout,
735
- isSharing,
736
- isTheme,
737
- isType,
738
- isVisual
739
- };
740
- //# sourceMappingURL=checks.mjs.map