@openui5/sap.ui.webc.common 1.111.0 → 1.112.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/package.json +2 -2
- package/src/sap/ui/webc/common/.library +2 -2
- package/src/sap/ui/webc/common/Configuration.js +6 -0
- package/src/sap/ui/webc/common/Icons.js +6 -0
- package/src/sap/ui/webc/common/WebComponent.js +1 -1
- package/src/sap/ui/webc/common/WebComponentMetadata.js +1 -1
- package/src/sap/ui/webc/common/library.js +3 -3
- package/src/sap/ui/webc/common/thirdparty/base/Boot.js +2 -11
- package/src/sap/ui/webc/common/thirdparty/base/CSP.js +3 -14
- package/src/sap/ui/webc/common/thirdparty/base/CustomElementsRegistry.js +0 -21
- package/src/sap/ui/webc/common/thirdparty/base/CustomElementsScopeUtils.js +5 -22
- package/src/sap/ui/webc/common/thirdparty/base/DOMObserver.js +5 -18
- package/src/sap/ui/webc/common/thirdparty/base/Device.js +2 -35
- package/src/sap/ui/webc/common/thirdparty/base/EventProvider.js +2 -21
- package/src/sap/ui/webc/common/thirdparty/base/FeaturesRegistry.js +0 -4
- package/src/sap/ui/webc/common/thirdparty/base/FontFace.js +4 -8
- package/src/sap/ui/webc/common/thirdparty/base/InitialConfiguration.js +13 -42
- package/src/sap/ui/webc/common/thirdparty/base/Keys.js +3 -138
- package/src/sap/ui/webc/common/thirdparty/base/ManagedStyles.js +0 -19
- package/src/sap/ui/webc/common/thirdparty/base/MediaRange.js +4 -8
- package/src/sap/ui/webc/common/thirdparty/base/PropertiesFileFormat.js +2 -16
- package/src/sap/ui/webc/common/thirdparty/base/Render.js +14 -35
- package/src/sap/ui/webc/common/thirdparty/base/RenderQueue.js +1 -16
- package/src/sap/ui/webc/common/thirdparty/base/RenderScheduler.js +2 -10
- package/src/sap/ui/webc/common/thirdparty/base/Runtimes.js +18 -34
- package/src/sap/ui/webc/common/thirdparty/base/StaticAreaItem.js +4 -25
- package/src/sap/ui/webc/common/thirdparty/base/SystemCSSVars.js +0 -3
- package/src/sap/ui/webc/common/thirdparty/base/UI5Element.js +104 -246
- package/src/sap/ui/webc/common/thirdparty/base/UI5ElementMetadata.js +39 -84
- package/src/sap/ui/webc/common/thirdparty/base/animations/AnimationQueue.js +0 -11
- package/src/sap/ui/webc/common/thirdparty/base/animations/animate.js +0 -8
- package/src/sap/ui/webc/common/thirdparty/base/animations/scroll.js +0 -4
- package/src/sap/ui/webc/common/thirdparty/base/animations/slideDown.js +9 -10
- package/src/sap/ui/webc/common/thirdparty/base/animations/slideUp.js +4 -7
- package/src/sap/ui/webc/common/thirdparty/base/asset-registries/Icons.js +9 -34
- package/src/sap/ui/webc/common/thirdparty/base/asset-registries/Illustrations.js +0 -8
- package/src/sap/ui/webc/common/thirdparty/base/asset-registries/LocaleData.js +36 -57
- package/src/sap/ui/webc/common/thirdparty/base/asset-registries/Themes.js +4 -27
- package/src/sap/ui/webc/common/thirdparty/base/asset-registries/i18n.js +12 -37
- package/src/sap/ui/webc/common/thirdparty/base/assets-meta/IconCollectionsAlias.js +0 -1
- package/src/sap/ui/webc/common/thirdparty/base/config/AnimationMode.js +0 -7
- package/src/sap/ui/webc/common/thirdparty/base/config/CalendarType.js +2 -7
- package/src/sap/ui/webc/common/thirdparty/base/config/FormatSettings.js +2 -4
- package/src/sap/ui/webc/common/thirdparty/base/config/Icons.js +3 -11
- package/src/sap/ui/webc/common/thirdparty/base/config/Language.js +4 -14
- package/src/sap/ui/webc/common/thirdparty/base/config/NoConflict.js +4 -14
- package/src/sap/ui/webc/common/thirdparty/base/config/RTL.js +2 -8
- package/src/sap/ui/webc/common/thirdparty/base/config/Theme.js +4 -15
- package/src/sap/ui/webc/common/thirdparty/base/delegate/ItemNavigation.js +8 -72
- package/src/sap/ui/webc/common/thirdparty/base/delegate/ResizeHandler.js +8 -23
- package/src/sap/ui/webc/common/thirdparty/base/delegate/ScrollEnablement.js +9 -34
- package/src/sap/ui/webc/common/thirdparty/base/features/F6Navigation.js +1 -20
- package/src/sap/ui/webc/common/thirdparty/base/features/OpenUI5Enablement.js +0 -17
- package/src/sap/ui/webc/common/thirdparty/base/features/OpenUI5Support.js +0 -32
- package/src/sap/ui/webc/common/thirdparty/base/generated/VersionInfo.js +1 -1
- package/src/sap/ui/webc/common/thirdparty/base/getSharedResource.js +1 -9
- package/src/sap/ui/webc/common/thirdparty/base/i18nBundle.js +4 -18
- package/src/sap/ui/webc/common/thirdparty/base/locale/Locale.js +0 -25
- package/src/sap/ui/webc/common/thirdparty/base/locale/RTLAwareRegistry.js +0 -4
- package/src/sap/ui/webc/common/thirdparty/base/locale/applyDirection.js +0 -2
- package/src/sap/ui/webc/common/thirdparty/base/locale/directionChange.js +2 -9
- package/src/sap/ui/webc/common/thirdparty/base/locale/getEffectiveDir.js +4 -9
- package/src/sap/ui/webc/common/thirdparty/base/locale/getLocale.js +3 -11
- package/src/sap/ui/webc/common/thirdparty/base/locale/languageChange.js +0 -8
- package/src/sap/ui/webc/common/thirdparty/base/locale/nextFallbackLocale.js +4 -8
- package/src/sap/ui/webc/common/thirdparty/base/locale/normalizeLocale.js +8 -14
- package/src/sap/ui/webc/common/thirdparty/base/renderer/LitRenderer.js +0 -11
- package/src/sap/ui/webc/common/thirdparty/base/renderer/directives/style-map.js +7 -21
- package/src/sap/ui/webc/common/thirdparty/base/renderer/executeTemplate.js +1 -6
- package/src/sap/ui/webc/common/thirdparty/base/theming/CustomStyle.js +2 -16
- package/src/sap/ui/webc/common/thirdparty/base/theming/ThemeLoaded.js +0 -8
- package/src/sap/ui/webc/common/thirdparty/base/theming/applyTheme.js +6 -21
- package/src/sap/ui/webc/common/thirdparty/base/theming/getConstructableStyle.js +1 -6
- package/src/sap/ui/webc/common/thirdparty/base/theming/getEffectiveLinksHrefs.js +0 -7
- package/src/sap/ui/webc/common/thirdparty/base/theming/getEffectiveStyle.js +0 -8
- package/src/sap/ui/webc/common/thirdparty/base/theming/getStylesString.js +0 -4
- package/src/sap/ui/webc/common/thirdparty/base/theming/getThemeDesignerTheme.js +4 -22
- package/src/sap/ui/webc/common/thirdparty/base/theming/preloadLinks.js +0 -5
- package/src/sap/ui/webc/common/thirdparty/base/thirdparty/_merge.js +10 -20
- package/src/sap/ui/webc/common/thirdparty/base/thirdparty/isPlainObject.js +0 -6
- package/src/sap/ui/webc/common/thirdparty/base/thirdparty/merge.js +0 -3
- package/src/sap/ui/webc/common/thirdparty/base/types/CSSColor.js +0 -4
- package/src/sap/ui/webc/common/thirdparty/base/types/CSSSize.js +0 -4
- package/src/sap/ui/webc/common/thirdparty/base/types/CalendarType.js +0 -5
- package/src/sap/ui/webc/common/thirdparty/base/types/DataType.js +0 -8
- package/src/sap/ui/webc/common/thirdparty/base/types/Float.js +0 -5
- package/src/sap/ui/webc/common/thirdparty/base/types/Integer.js +0 -5
- package/src/sap/ui/webc/common/thirdparty/base/types/InvisibleMessageMode.js +0 -6
- package/src/sap/ui/webc/common/thirdparty/base/types/ItemNavigationBehavior.js +0 -2
- package/src/sap/ui/webc/common/thirdparty/base/types/PopupState.js +0 -8
- package/src/sap/ui/webc/common/thirdparty/base/types/ValueState.js +0 -5
- package/src/sap/ui/webc/common/thirdparty/base/updateShadowRoot.js +0 -5
- package/src/sap/ui/webc/common/thirdparty/base/util/AriaLabelHelper.js +1 -9
- package/src/sap/ui/webc/common/thirdparty/base/util/Caret.js +0 -6
- package/src/sap/ui/webc/common/thirdparty/base/util/ColorConversion.js +29 -46
- package/src/sap/ui/webc/common/thirdparty/base/util/FetchHelper.js +0 -10
- package/src/sap/ui/webc/common/thirdparty/base/util/FocusableElements.js +2 -19
- package/src/sap/ui/webc/common/thirdparty/base/util/InvisibleMessage.js +3 -9
- package/src/sap/ui/webc/common/thirdparty/base/util/PopupUtils.js +0 -28
- package/src/sap/ui/webc/common/thirdparty/base/util/SlotsHelper.js +4 -15
- package/src/sap/ui/webc/common/thirdparty/base/util/StringHelper.js +0 -7
- package/src/sap/ui/webc/common/thirdparty/base/util/TabbableElements.js +0 -12
- package/src/sap/ui/webc/common/thirdparty/base/util/arraysAreEqual.js +0 -4
- package/src/sap/ui/webc/common/thirdparty/base/util/clamp.js +0 -2
- package/src/sap/ui/webc/common/thirdparty/base/util/createLinkInHead.js +0 -2
- package/src/sap/ui/webc/common/thirdparty/base/util/createStyleInHead.js +0 -2
- package/src/sap/ui/webc/common/thirdparty/base/util/debounce.js +1 -3
- package/src/sap/ui/webc/common/thirdparty/base/util/detectNavigatorLanguage.js +0 -4
- package/src/sap/ui/webc/common/thirdparty/base/util/escapeRegex.js +0 -2
- package/src/sap/ui/webc/common/thirdparty/base/util/findNodeOwner.js +0 -6
- package/src/sap/ui/webc/common/thirdparty/base/util/formatMessage.js +2 -7
- package/src/sap/ui/webc/common/thirdparty/base/util/generateHighlightedMarkup.js +9 -17
- package/src/sap/ui/webc/common/thirdparty/base/util/getActiveElement.js +0 -4
- package/src/sap/ui/webc/common/thirdparty/base/util/getClassCopy.js +0 -3
- package/src/sap/ui/webc/common/thirdparty/base/util/getDesigntimePropertyAsArray.js +0 -2
- package/src/sap/ui/webc/common/thirdparty/base/util/getEffectiveContentDensity.js +0 -2
- package/src/sap/ui/webc/common/thirdparty/base/util/getFileExtension.js +0 -4
- package/src/sap/ui/webc/common/thirdparty/base/util/getNormalizedTarget.js +0 -4
- package/src/sap/ui/webc/common/thirdparty/base/util/getSingletonElementInstance.js +0 -4
- package/src/sap/ui/webc/common/thirdparty/base/util/isDefaultSlotProvided.js +0 -2
- package/src/sap/ui/webc/common/thirdparty/base/util/isDescendantOf.js +0 -6
- package/src/sap/ui/webc/common/thirdparty/base/util/isElementInView.js +0 -2
- package/src/sap/ui/webc/common/thirdparty/base/util/isNodeClickable.js +0 -5
- package/src/sap/ui/webc/common/thirdparty/base/util/isNodeHidden.js +0 -3
- package/src/sap/ui/webc/common/thirdparty/base/util/isNodeTabbable.js +0 -9
- package/src/sap/ui/webc/common/thirdparty/base/util/isValidPropertyName.js +1 -3
- package/src/sap/ui/webc/common/thirdparty/base/util/setToArray.js +0 -2
- package/src/sap/ui/webc/common/thirdparty/base/util/whenDOMReady.js +0 -2
- package/src/sap/ui/webc/common/thirdparty/icons/generated/json-imports/i18n.js +0 -52
- package/src/sap/ui/webc/common/thirdparty/icons/json-imports/Icons.js +0 -5
- package/src/sap/ui/webc/common/thirdparty/icons-business-suite/json-imports/Icons.js +0 -3
- package/src/sap/ui/webc/common/thirdparty/icons-tnt/json-imports/Icons.js +0 -3
- package/src/sap/ui/webc/common/thirdparty/lit-html/directive-helpers.js +62 -70
- package/src/sap/ui/webc/common/thirdparty/lit-html/directive.js +11 -20
- package/src/sap/ui/webc/common/thirdparty/lit-html/directives/class-map.js +0 -10
- package/src/sap/ui/webc/common/thirdparty/lit-html/directives/if-defined.js +0 -2
- package/src/sap/ui/webc/common/thirdparty/lit-html/directives/repeat.js +55 -71
- package/src/sap/ui/webc/common/thirdparty/lit-html/directives/unsafe-html.js +0 -4
- package/src/sap/ui/webc/common/thirdparty/lit-html/lit-html.js +96 -171
- package/src/sap/ui/webc/common/thirdparty/lit-html/static.js +34 -40
- package/src/sap/ui/webc/common/thirdparty/localization/DateFormat.js +0 -2
- package/src/sap/ui/webc/common/thirdparty/localization/LocaleData.js +0 -2
- package/src/sap/ui/webc/common/thirdparty/localization/dates/CalendarDate.js +13 -56
- package/src/sap/ui/webc/common/thirdparty/localization/dates/ExtremeDates.js +0 -11
- package/src/sap/ui/webc/common/thirdparty/localization/dates/calculateWeekNumber.js +5 -8
- package/src/sap/ui/webc/common/thirdparty/localization/dates/getRoundedTimestamp.js +0 -3
- package/src/sap/ui/webc/common/thirdparty/localization/dates/getTodayUTCTimestamp.js +0 -3
- package/src/sap/ui/webc/common/thirdparty/localization/dates/modifyDateBy.js +0 -9
- package/src/sap/ui/webc/common/thirdparty/localization/getCachedLocaleDataInstance.js +0 -5
- package/src/sap/ui/webc/common/thirdparty/localization/locale/getLocaleData.js +1 -6
- package/src/sap/ui/webc/common/thirdparty/theming/generated/json-imports/Themes.js +0 -16
- package/ui5.yaml +7 -7
- package/src/sap/ui/webc/common/thirdparty/icons-business-suite/main-milestone.js +0 -25
- package/src/sap/ui/webc/common/thirdparty/icons-business-suite/main-sequence.js +0 -25
@@ -7,32 +7,25 @@ sap.ui.define(["exports", "../Render", "../getSharedResource", "../EventProvider
|
|
7
7
|
_exports.getCustomCSS = _exports.detachCustomCSSChange = _exports.attachCustomCSSChange = _exports.addCustomCSS = void 0;
|
8
8
|
_getSharedResource = _interopRequireDefault(_getSharedResource);
|
9
9
|
_EventProvider = _interopRequireDefault(_EventProvider);
|
10
|
-
|
11
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
12
|
-
|
13
11
|
const eventProvider = (0, _getSharedResource.default)("CustomStyle.eventProvider", new _EventProvider.default());
|
14
12
|
const CUSTOM_CSS_CHANGE = "CustomCSSChange";
|
15
|
-
|
16
13
|
const attachCustomCSSChange = listener => {
|
17
14
|
eventProvider.attachEvent(CUSTOM_CSS_CHANGE, listener);
|
18
15
|
};
|
19
|
-
|
20
16
|
_exports.attachCustomCSSChange = attachCustomCSSChange;
|
21
|
-
|
22
17
|
const detachCustomCSSChange = listener => {
|
23
18
|
eventProvider.detachEvent(CUSTOM_CSS_CHANGE, listener);
|
24
19
|
};
|
25
|
-
|
26
20
|
_exports.detachCustomCSSChange = detachCustomCSSChange;
|
27
|
-
|
28
21
|
const fireCustomCSSChange = tag => {
|
29
22
|
return eventProvider.fireEvent(CUSTOM_CSS_CHANGE, tag);
|
30
23
|
};
|
24
|
+
const customCSSFor = (0, _getSharedResource.default)("CustomStyle.customCSSFor", {});
|
31
25
|
|
32
|
-
|
26
|
+
// Listen to the eventProvider, in case other copies of this CustomStyle module fire this
|
33
27
|
// event, and this copy would therefore need to reRender the ui5 webcomponents; but
|
34
28
|
// don't reRender if it was this copy that fired the event to begin with.
|
35
|
-
|
36
29
|
let skipRerender;
|
37
30
|
attachCustomCSSChange(tag => {
|
38
31
|
if (!skipRerender) {
|
@@ -41,15 +34,12 @@ sap.ui.define(["exports", "../Render", "../getSharedResource", "../EventProvider
|
|
41
34
|
});
|
42
35
|
}
|
43
36
|
});
|
44
|
-
|
45
37
|
const addCustomCSS = (tag, css) => {
|
46
38
|
if (!customCSSFor[tag]) {
|
47
39
|
customCSSFor[tag] = [];
|
48
40
|
}
|
49
|
-
|
50
41
|
customCSSFor[tag].push(css);
|
51
42
|
skipRerender = true;
|
52
|
-
|
53
43
|
try {
|
54
44
|
// The event is fired and the attached event listeners are all called synchronously
|
55
45
|
// The skipRerender flag will be used to avoid calling reRenderAllUI5Elements twice when it is this copy
|
@@ -58,17 +48,13 @@ sap.ui.define(["exports", "../Render", "../getSharedResource", "../EventProvider
|
|
58
48
|
} finally {
|
59
49
|
skipRerender = false;
|
60
50
|
}
|
61
|
-
|
62
51
|
return (0, _Render.reRenderAllUI5Elements)({
|
63
52
|
tag
|
64
53
|
});
|
65
54
|
};
|
66
|
-
|
67
55
|
_exports.addCustomCSS = addCustomCSS;
|
68
|
-
|
69
56
|
const getCustomCSS = tag => {
|
70
57
|
return customCSSFor[tag] ? customCSSFor[tag].join("") : "";
|
71
58
|
};
|
72
|
-
|
73
59
|
_exports.getCustomCSS = getCustomCSS;
|
74
60
|
});
|
@@ -6,27 +6,19 @@ sap.ui.define(["exports", "../EventProvider"], function (_exports, _EventProvide
|
|
6
6
|
});
|
7
7
|
_exports.fireThemeLoaded = _exports.detachThemeLoaded = _exports.attachThemeLoaded = void 0;
|
8
8
|
_EventProvider = _interopRequireDefault(_EventProvider);
|
9
|
-
|
10
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
|
-
|
12
10
|
const eventProvider = new _EventProvider.default();
|
13
11
|
const THEME_LOADED = "themeLoaded";
|
14
|
-
|
15
12
|
const attachThemeLoaded = listener => {
|
16
13
|
eventProvider.attachEvent(THEME_LOADED, listener);
|
17
14
|
};
|
18
|
-
|
19
15
|
_exports.attachThemeLoaded = attachThemeLoaded;
|
20
|
-
|
21
16
|
const detachThemeLoaded = listener => {
|
22
17
|
eventProvider.detachEvent(THEME_LOADED, listener);
|
23
18
|
};
|
24
|
-
|
25
19
|
_exports.detachThemeLoaded = detachThemeLoaded;
|
26
|
-
|
27
20
|
const fireThemeLoaded = theme => {
|
28
21
|
return eventProvider.fireEvent(THEME_LOADED, theme);
|
29
22
|
};
|
30
|
-
|
31
23
|
_exports.fireThemeLoaded = fireThemeLoaded;
|
32
24
|
});
|
@@ -6,85 +6,70 @@ sap.ui.define(["exports", "../asset-registries/Themes", "../ManagedStyles", "./g
|
|
6
6
|
});
|
7
7
|
_exports.default = void 0;
|
8
8
|
_getThemeDesignerTheme = _interopRequireDefault(_getThemeDesignerTheme);
|
9
|
-
|
10
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
|
-
|
12
10
|
const BASE_THEME_PACKAGE = "@ui5/webcomponents-theming";
|
13
|
-
|
14
11
|
const isThemeBaseRegistered = () => {
|
15
12
|
const registeredPackages = (0, _Themes.getRegisteredPackages)();
|
16
13
|
return registeredPackages.has(BASE_THEME_PACKAGE);
|
17
14
|
};
|
18
|
-
|
19
15
|
const loadThemeBase = async theme => {
|
20
16
|
if (!isThemeBaseRegistered()) {
|
21
17
|
return;
|
22
18
|
}
|
23
|
-
|
24
19
|
const cssData = await (0, _Themes.getThemeProperties)(BASE_THEME_PACKAGE, theme);
|
25
|
-
|
26
20
|
if (cssData) {
|
27
21
|
(0, _ManagedStyles.createOrUpdateStyle)(cssData, "data-ui5-theme-properties", BASE_THEME_PACKAGE);
|
28
22
|
}
|
29
23
|
};
|
30
|
-
|
31
24
|
const deleteThemeBase = () => {
|
32
25
|
(0, _ManagedStyles.removeStyle)("data-ui5-theme-properties", BASE_THEME_PACKAGE);
|
33
26
|
};
|
34
|
-
|
35
27
|
const loadComponentPackages = async theme => {
|
36
28
|
const registeredPackages = (0, _Themes.getRegisteredPackages)();
|
37
29
|
registeredPackages.forEach(async packageName => {
|
38
30
|
if (packageName === BASE_THEME_PACKAGE) {
|
39
31
|
return;
|
40
32
|
}
|
41
|
-
|
42
33
|
const cssData = await (0, _Themes.getThemeProperties)(packageName, theme);
|
43
|
-
|
44
34
|
if (cssData) {
|
45
35
|
(0, _ManagedStyles.createOrUpdateStyle)(cssData, "data-ui5-theme-properties", packageName);
|
46
36
|
}
|
47
37
|
});
|
48
38
|
};
|
49
|
-
|
50
39
|
const detectExternalTheme = () => {
|
51
40
|
// If theme designer theme is detected, use this
|
52
41
|
const extTheme = (0, _getThemeDesignerTheme.default)();
|
53
|
-
|
54
42
|
if (extTheme) {
|
55
43
|
return extTheme;
|
56
|
-
}
|
57
|
-
|
44
|
+
}
|
58
45
|
|
46
|
+
// If OpenUI5Support is enabled, try to find out if it loaded variables
|
59
47
|
const OpenUI5Support = (0, _FeaturesRegistry.getFeature)("OpenUI5Support");
|
60
|
-
|
61
48
|
if (OpenUI5Support) {
|
62
49
|
const varsLoaded = OpenUI5Support.cssVariablesLoaded();
|
63
|
-
|
64
50
|
if (varsLoaded) {
|
65
51
|
return {
|
66
52
|
themeName: OpenUI5Support.getConfigurationSettingsObject().theme // just themeName, baseThemeName is only relevant for custom themes
|
67
|
-
|
68
53
|
};
|
69
54
|
}
|
70
55
|
}
|
71
56
|
};
|
72
57
|
|
73
58
|
const applyTheme = async theme => {
|
74
|
-
const extTheme = detectExternalTheme();
|
59
|
+
const extTheme = detectExternalTheme();
|
75
60
|
|
61
|
+
// Only load theme_base properties if there is no externally loaded theme, or there is, but it is not being loaded
|
76
62
|
if (!extTheme || theme !== extTheme.themeName) {
|
77
63
|
await loadThemeBase(theme);
|
78
64
|
} else {
|
79
65
|
deleteThemeBase();
|
80
|
-
}
|
81
|
-
|
66
|
+
}
|
82
67
|
|
68
|
+
// Always load component packages properties. For non-registered themes, try with the base theme, if any
|
83
69
|
const packagesTheme = (0, _Themes.isThemeRegistered)(theme) ? theme : extTheme && extTheme.baseThemeName;
|
84
70
|
await loadComponentPackages(packagesTheme);
|
85
71
|
(0, _ThemeLoaded.fireThemeLoaded)(theme);
|
86
72
|
};
|
87
|
-
|
88
73
|
var _default = applyTheme;
|
89
74
|
_exports.default = _default;
|
90
75
|
});
|
@@ -6,34 +6,29 @@ sap.ui.define(["exports", "./getEffectiveStyle", "./CustomStyle"], function (_ex
|
|
6
6
|
});
|
7
7
|
_exports.default = void 0;
|
8
8
|
_getEffectiveStyle = _interopRequireDefault(_getEffectiveStyle);
|
9
|
-
|
10
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
|
-
|
12
10
|
const constructableStyleMap = new Map();
|
13
11
|
(0, _CustomStyle.attachCustomCSSChange)(tag => {
|
14
12
|
constructableStyleMap.delete(`${tag}_normal`); // there is custom CSS only for the component itself, not for its static area part
|
15
13
|
});
|
14
|
+
|
16
15
|
/**
|
17
16
|
* Returns (and caches) a constructable style sheet for a web component class
|
18
17
|
* Note: Chrome
|
19
18
|
* @param ElementClass
|
20
19
|
* @returns {*}
|
21
20
|
*/
|
22
|
-
|
23
21
|
const getConstructableStyle = (ElementClass, forStaticArea = false) => {
|
24
22
|
const tag = ElementClass.getMetadata().getTag();
|
25
23
|
const key = `${tag}_${forStaticArea ? "static" : "normal"}`;
|
26
|
-
|
27
24
|
if (!constructableStyleMap.has(key)) {
|
28
25
|
const styleContent = (0, _getEffectiveStyle.default)(ElementClass, forStaticArea);
|
29
26
|
const style = new CSSStyleSheet();
|
30
27
|
style.replaceSync(styleContent);
|
31
28
|
constructableStyleMap.set(key, [style]);
|
32
29
|
}
|
33
|
-
|
34
30
|
return constructableStyleMap.get(key);
|
35
31
|
};
|
36
|
-
|
37
32
|
var _default = getConstructableStyle;
|
38
33
|
_exports.default = _default;
|
39
34
|
});
|
@@ -5,30 +5,23 @@ sap.ui.define(["exports", "../CSP", "../FeaturesRegistry"], function (_exports,
|
|
5
5
|
value: true
|
6
6
|
});
|
7
7
|
_exports.default = void 0;
|
8
|
-
|
9
8
|
const flatten = arr => {
|
10
9
|
return arr.reduce((acc, val) => acc.concat(Array.isArray(val) ? flatten(val) : val), []);
|
11
10
|
};
|
12
|
-
|
13
11
|
const getEffectiveLinksHrefs = (ElementClass, forStaticArea = false) => {
|
14
12
|
let stylesData = ElementClass[forStaticArea ? "staticAreaStyles" : "styles"];
|
15
13
|
const OpenUI5Enablement = (0, _FeaturesRegistry.getFeature)("OpenUI5Enablement");
|
16
|
-
|
17
14
|
if (!stylesData) {
|
18
15
|
return;
|
19
16
|
}
|
20
|
-
|
21
17
|
if (!Array.isArray(stylesData)) {
|
22
18
|
stylesData = [stylesData];
|
23
19
|
}
|
24
|
-
|
25
20
|
if (OpenUI5Enablement) {
|
26
21
|
stylesData.push(OpenUI5Enablement.getBusyIndicatorStyles());
|
27
22
|
}
|
28
|
-
|
29
23
|
return flatten(stylesData).filter(data => !!data).map(data => (0, _CSP.getUrl)(data.packageName, data.fileName));
|
30
24
|
};
|
31
|
-
|
32
25
|
var _default = getEffectiveLinksHrefs;
|
33
26
|
_exports.default = _default;
|
34
27
|
});
|
@@ -6,9 +6,7 @@ sap.ui.define(["exports", "./CustomStyle", "./getStylesString", "../FeaturesRegi
|
|
6
6
|
});
|
7
7
|
_exports.default = void 0;
|
8
8
|
_getStylesString = _interopRequireDefault(_getStylesString);
|
9
|
-
|
10
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
|
-
|
12
10
|
const effectiveStyleMap = new Map();
|
13
11
|
(0, _CustomStyle.attachCustomCSSChange)(tag => {
|
14
12
|
effectiveStyleMap.delete(`${tag}_normal`); // there is custom CSS only for the component itself, not for its static area part
|
@@ -18,15 +16,12 @@ sap.ui.define(["exports", "./CustomStyle", "./getStylesString", "../FeaturesRegi
|
|
18
16
|
const tag = ElementClass.getMetadata().getTag();
|
19
17
|
const key = `${tag}_${forStaticArea ? "static" : "normal"}`;
|
20
18
|
const OpenUI5Enablement = (0, _FeaturesRegistry.getFeature)("OpenUI5Enablement");
|
21
|
-
|
22
19
|
if (!effectiveStyleMap.has(key)) {
|
23
20
|
let effectiveStyle;
|
24
21
|
let busyIndicatorStyles = "";
|
25
|
-
|
26
22
|
if (OpenUI5Enablement) {
|
27
23
|
busyIndicatorStyles = (0, _getStylesString.default)(OpenUI5Enablement.getBusyIndicatorStyles());
|
28
24
|
}
|
29
|
-
|
30
25
|
if (forStaticArea) {
|
31
26
|
effectiveStyle = (0, _getStylesString.default)(ElementClass.staticAreaStyles);
|
32
27
|
} else {
|
@@ -34,14 +29,11 @@ sap.ui.define(["exports", "./CustomStyle", "./getStylesString", "../FeaturesRegi
|
|
34
29
|
const builtInStyles = (0, _getStylesString.default)(ElementClass.styles);
|
35
30
|
effectiveStyle = `${builtInStyles} ${customStyle}`;
|
36
31
|
}
|
37
|
-
|
38
32
|
effectiveStyle = `${effectiveStyle} ${busyIndicatorStyles}`;
|
39
33
|
effectiveStyleMap.set(key, effectiveStyle);
|
40
34
|
}
|
41
|
-
|
42
35
|
return effectiveStyleMap.get(key);
|
43
36
|
};
|
44
|
-
|
45
37
|
var _default = getEffectiveStyle;
|
46
38
|
_exports.default = _default;
|
47
39
|
});
|
@@ -5,21 +5,17 @@ sap.ui.define(["exports"], function (_exports) {
|
|
5
5
|
value: true
|
6
6
|
});
|
7
7
|
_exports.default = void 0;
|
8
|
-
|
9
8
|
const getStylesString = styles => {
|
10
9
|
if (Array.isArray(styles)) {
|
11
10
|
return flatten(styles.filter(style => !!style)).map(style => {
|
12
11
|
return typeof style === "string" ? style : style.content;
|
13
12
|
}).join(" ");
|
14
13
|
}
|
15
|
-
|
16
14
|
return typeof styles === "string" ? styles : styles.content;
|
17
15
|
};
|
18
|
-
|
19
16
|
const flatten = arr => {
|
20
17
|
return arr.reduce((acc, val) => acc.concat(Array.isArray(val) ? flatten(val) : val), []);
|
21
18
|
};
|
22
|
-
|
23
19
|
var _default = getStylesString;
|
24
20
|
_exports.default = _default;
|
25
21
|
});
|
@@ -6,98 +6,80 @@ sap.ui.define(["exports"], function (_exports) {
|
|
6
6
|
});
|
7
7
|
_exports.default = void 0;
|
8
8
|
const warnings = new Set();
|
9
|
-
|
10
9
|
const getThemeMetadata = () => {
|
11
10
|
// Check if the class was already applied, most commonly to the link/style tag with the CSS Variables
|
12
11
|
let el = document.querySelector(".sapThemeMetaData-Base-baseLib") || document.querySelector(".sapThemeMetaData-UI5-sap-ui-core");
|
13
|
-
|
14
12
|
if (el) {
|
15
13
|
return getComputedStyle(el).backgroundImage;
|
16
14
|
}
|
17
|
-
|
18
15
|
el = document.createElement("span");
|
19
|
-
el.style.display = "none";
|
16
|
+
el.style.display = "none";
|
20
17
|
|
18
|
+
// Try with sapThemeMetaData-Base-baseLib first
|
21
19
|
el.classList.add("sapThemeMetaData-Base-baseLib");
|
22
20
|
document.body.appendChild(el);
|
23
|
-
let metadata = getComputedStyle(el).backgroundImage;
|
21
|
+
let metadata = getComputedStyle(el).backgroundImage;
|
24
22
|
|
23
|
+
// Try with sapThemeMetaData-UI5-sap-ui-core only if the previous selector was not found
|
25
24
|
if (metadata === "none") {
|
26
25
|
el.classList.add("sapThemeMetaData-UI5-sap-ui-core");
|
27
26
|
metadata = getComputedStyle(el).backgroundImage;
|
28
27
|
}
|
29
|
-
|
30
28
|
document.body.removeChild(el);
|
31
29
|
return metadata;
|
32
30
|
};
|
33
|
-
|
34
31
|
const parseThemeMetadata = metadataString => {
|
35
32
|
const params = /\(["']?data:text\/plain;utf-8,(.*?)['"]?\)$/i.exec(metadataString);
|
36
|
-
|
37
33
|
if (params && params.length >= 2) {
|
38
34
|
let paramsString = params[1];
|
39
35
|
paramsString = paramsString.replace(/\\"/g, `"`);
|
40
|
-
|
41
36
|
if (paramsString.charAt(0) !== "{" && paramsString.charAt(paramsString.length - 1) !== "}") {
|
42
37
|
try {
|
43
38
|
paramsString = decodeURIComponent(paramsString);
|
44
39
|
} catch (ex) {
|
45
40
|
if (!warnings.has("decode")) {
|
46
41
|
console.warn("Malformed theme metadata string, unable to decodeURIComponent"); // eslint-disable-line
|
47
|
-
|
48
42
|
warnings.add("decode");
|
49
43
|
}
|
50
|
-
|
51
44
|
return;
|
52
45
|
}
|
53
46
|
}
|
54
|
-
|
55
47
|
try {
|
56
48
|
return JSON.parse(paramsString);
|
57
49
|
} catch (ex) {
|
58
50
|
if (!warnings.has("parse")) {
|
59
51
|
console.warn("Malformed theme metadata string, unable to parse JSON"); // eslint-disable-line
|
60
|
-
|
61
52
|
warnings.add("parse");
|
62
53
|
}
|
63
54
|
}
|
64
55
|
}
|
65
56
|
};
|
66
|
-
|
67
57
|
const processThemeMetadata = metadata => {
|
68
58
|
let themeName;
|
69
59
|
let baseThemeName;
|
70
|
-
|
71
60
|
try {
|
72
61
|
themeName = metadata.Path.match(/\.([^.]+)\.css_variables$/)[1];
|
73
62
|
baseThemeName = metadata.Extends[0];
|
74
63
|
} catch (ex) {
|
75
64
|
if (!warnings.has("object")) {
|
76
65
|
console.warn("Malformed theme metadata Object", metadata); // eslint-disable-line
|
77
|
-
|
78
66
|
warnings.add("object");
|
79
67
|
}
|
80
|
-
|
81
68
|
return;
|
82
69
|
}
|
83
|
-
|
84
70
|
return {
|
85
71
|
themeName,
|
86
72
|
baseThemeName
|
87
73
|
};
|
88
74
|
};
|
89
|
-
|
90
75
|
const getThemeDesignerTheme = () => {
|
91
76
|
const metadataString = getThemeMetadata();
|
92
|
-
|
93
77
|
if (!metadataString || metadataString === "none") {
|
94
78
|
return;
|
95
79
|
}
|
96
|
-
|
97
80
|
const metadata = parseThemeMetadata(metadataString);
|
98
81
|
return processThemeMetadata(metadata);
|
99
82
|
};
|
100
|
-
|
101
83
|
var _default = getThemeDesignerTheme;
|
102
84
|
_exports.default = _default;
|
103
85
|
});
|
@@ -7,16 +7,12 @@ sap.ui.define(["exports", "./getEffectiveLinksHrefs", "../util/createLinkInHead"
|
|
7
7
|
_exports.default = void 0;
|
8
8
|
_getEffectiveLinksHrefs = _interopRequireDefault(_getEffectiveLinksHrefs);
|
9
9
|
_createLinkInHead = _interopRequireDefault(_createLinkInHead);
|
10
|
-
|
11
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
12
|
-
|
13
11
|
const preloaded = new Set();
|
14
|
-
|
15
12
|
const preloadLinks = ElementClass => {
|
16
13
|
if (!(0, _CSP.shouldUseLinks)() || !(0, _CSP.shouldPreloadLinks)()) {
|
17
14
|
return;
|
18
15
|
}
|
19
|
-
|
20
16
|
const linksHrefs = (0, _getEffectiveLinksHrefs.default)(ElementClass, false) || [];
|
21
17
|
const staticAreaLinksHrefs = (0, _getEffectiveLinksHrefs.default)(ElementClass, true) || [];
|
22
18
|
[...linksHrefs, ...staticAreaLinksHrefs].forEach(href => {
|
@@ -29,7 +25,6 @@ sap.ui.define(["exports", "./getEffectiveLinksHrefs", "../util/createLinkInHead"
|
|
29
25
|
}
|
30
26
|
});
|
31
27
|
};
|
32
|
-
|
33
28
|
var _default = preloadLinks;
|
34
29
|
_exports.default = _default;
|
35
30
|
});
|
@@ -6,38 +6,31 @@ sap.ui.define(["exports", "./isPlainObject"], function (_exports, _isPlainObject
|
|
6
6
|
});
|
7
7
|
_exports.default = void 0;
|
8
8
|
_isPlainObject = _interopRequireDefault(_isPlainObject);
|
9
|
-
|
10
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
|
-
|
12
10
|
var oToken = Object.create(null);
|
13
|
-
|
14
11
|
var fnMerge = function () {
|
15
12
|
var src,
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
13
|
+
copyIsArray,
|
14
|
+
copy,
|
15
|
+
name,
|
16
|
+
options,
|
17
|
+
clone,
|
18
|
+
target = arguments[2] || {},
|
19
|
+
i = 3,
|
20
|
+
length = arguments.length,
|
21
|
+
deep = arguments[0] || false,
|
22
|
+
skipToken = arguments[1] ? undefined : oToken;
|
27
23
|
if (typeof target !== 'object' && typeof target !== 'function') {
|
28
24
|
target = {};
|
29
25
|
}
|
30
|
-
|
31
26
|
for (; i < length; i++) {
|
32
27
|
if ((options = arguments[i]) != null) {
|
33
28
|
for (name in options) {
|
34
29
|
src = target[name];
|
35
30
|
copy = options[name];
|
36
|
-
|
37
31
|
if (name === '__proto__' || target === copy) {
|
38
32
|
continue;
|
39
33
|
}
|
40
|
-
|
41
34
|
if (deep && copy && ((0, _isPlainObject.default)(copy) || (copyIsArray = Array.isArray(copy)))) {
|
42
35
|
if (copyIsArray) {
|
43
36
|
copyIsArray = false;
|
@@ -45,7 +38,6 @@ sap.ui.define(["exports", "./isPlainObject"], function (_exports, _isPlainObject
|
|
45
38
|
} else {
|
46
39
|
clone = src && (0, _isPlainObject.default)(src) ? src : {};
|
47
40
|
}
|
48
|
-
|
49
41
|
target[name] = fnMerge(deep, arguments[1], clone, copy);
|
50
42
|
} else if (copy !== skipToken) {
|
51
43
|
target[name] = copy;
|
@@ -53,10 +45,8 @@ sap.ui.define(["exports", "./isPlainObject"], function (_exports, _isPlainObject
|
|
53
45
|
}
|
54
46
|
}
|
55
47
|
}
|
56
|
-
|
57
48
|
return target;
|
58
49
|
};
|
59
|
-
|
60
50
|
var _default = fnMerge;
|
61
51
|
_exports.default = _default;
|
62
52
|
});
|
@@ -10,24 +10,18 @@ sap.ui.define(["exports"], function (_exports) {
|
|
10
10
|
var toString = class2type.toString;
|
11
11
|
var fnToString = hasOwn.toString;
|
12
12
|
var ObjectFunctionString = fnToString.call(Object);
|
13
|
-
|
14
13
|
var fnIsPlainObject = function (obj) {
|
15
14
|
var proto, Ctor;
|
16
|
-
|
17
15
|
if (!obj || toString.call(obj) !== "[object Object]") {
|
18
16
|
return false;
|
19
17
|
}
|
20
|
-
|
21
18
|
proto = Object.getPrototypeOf(obj);
|
22
|
-
|
23
19
|
if (!proto) {
|
24
20
|
return true;
|
25
21
|
}
|
26
|
-
|
27
22
|
Ctor = hasOwn.call(proto, "constructor") && proto.constructor;
|
28
23
|
return typeof Ctor === "function" && fnToString.call(Ctor) === ObjectFunctionString;
|
29
24
|
};
|
30
|
-
|
31
25
|
var _default = fnIsPlainObject;
|
32
26
|
_exports.default = _default;
|
33
27
|
});
|
@@ -6,15 +6,12 @@ sap.ui.define(["exports", "./_merge"], function (_exports, _merge2) {
|
|
6
6
|
});
|
7
7
|
_exports.default = void 0;
|
8
8
|
_merge2 = _interopRequireDefault(_merge2);
|
9
|
-
|
10
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
|
-
|
12
10
|
var fnMerge = function () {
|
13
11
|
var args = [true, false];
|
14
12
|
args.push.apply(args, arguments);
|
15
13
|
return _merge2.default.apply(null, args);
|
16
14
|
};
|
17
|
-
|
18
15
|
var _default = fnMerge;
|
19
16
|
_exports.default = _default;
|
20
17
|
});
|
@@ -6,16 +6,12 @@ sap.ui.define(["exports", "./DataType"], function (_exports, _DataType) {
|
|
6
6
|
});
|
7
7
|
_exports.default = void 0;
|
8
8
|
_DataType = _interopRequireDefault(_DataType);
|
9
|
-
|
10
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
|
-
|
12
10
|
class CSSColor extends _DataType.default {
|
13
11
|
static isValid(value) {
|
14
12
|
return /^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})|rgb\(\s*((1?[0-9]?[0-9]|2([0-4][0-9]|5[0-5]))|([0-9]?[0-9](\.[0-9]+)?|100(\.0+)?)%)\s*(,\s*((1?[0-9]?[0-9]|2([0-4][0-9]|5[0-5]))|([0-9]?[0-9](\.[0-9]+)?|100(\.0+)?)%)\s*){2}\)|rgba\((\s*((1?[0-9]?[0-9]|2([0-4][0-9]|5[0-5]))|([0-9]?[0-9](\.[0-9]+)?|100(\.0+)?)%)\s*,){3}\s*(0(\.[0-9]+)?|1(\.0+)?)\s*\)|hsl\(\s*([0-2]?[0-9]?[0-9]|3([0-5][0-9]|60))\s*(,\s*(([0-9]?[0-9](\.[0-9]+)?|100(\.0+)?)%)\s*){2}\)|hsla\(\s*([0-2]?[0-9]?[0-9]|3([0-5][0-9]|60))\s*,(\s*(([0-9]?[0-9](\.[0-9]+)?|100(\.0+)?)%)\s*,){2}\s*(0(\.[0-9]+)?|1(\.0+)?)\s*\)|aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgrey|darkgreen|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|grey|green|greenyellow|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgrey|lightgreen|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silverskyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen|transparent|inherit|)$/.test(value); // eslint-disable-line
|
15
13
|
}
|
16
|
-
|
17
14
|
}
|
18
|
-
|
19
15
|
var _default = CSSColor;
|
20
16
|
_exports.default = _default;
|
21
17
|
});
|
@@ -6,16 +6,12 @@ sap.ui.define(["exports", "./DataType"], function (_exports, _DataType) {
|
|
6
6
|
});
|
7
7
|
_exports.default = void 0;
|
8
8
|
_DataType = _interopRequireDefault(_DataType);
|
9
|
-
|
10
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
|
-
|
12
10
|
class CSSSize extends _DataType.default {
|
13
11
|
static isValid(value) {
|
14
12
|
return /^(auto|inherit|[-+]?(0*|([0-9]+|[0-9]*\.[0-9]+)([rR][eE][mM]|[eE][mM]|[eE][xX]|[pP][xX]|[cC][mM]|[mM][mM]|[iI][nN]|[pP][tT]|[pP][cC]|%))|calc\(\s*(\(\s*)*[-+]?(([0-9]+|[0-9]*\.[0-9]+)([rR][eE][mM]|[eE][mM]|[eE][xX]|[pP][xX]|[cC][mM]|[mM][mM]|[iI][nN]|[pP][tT]|[pP][cC]|%)?)(\s*(\)\s*)*(\s[-+]\s|[*\/])\s*(\(\s*)*([-+]?(([0-9]+|[0-9]*\.[0-9]+)([rR][eE][mM]|[eE][mM]|[eE][xX]|[pP][xX]|[cC][mM]|[mM][mM]|[iI][nN]|[pP][tT]|[pP][cC]|%)?)))*\s*(\)\s*)*\))$/.test(value); // eslint-disable-line
|
15
13
|
}
|
16
|
-
|
17
14
|
}
|
18
|
-
|
19
15
|
var _default = CSSSize;
|
20
16
|
_exports.default = _default;
|
21
17
|
});
|
@@ -6,9 +6,7 @@ sap.ui.define(["exports", "./DataType"], function (_exports, _DataType) {
|
|
6
6
|
});
|
7
7
|
_exports.default = void 0;
|
8
8
|
_DataType = _interopRequireDefault(_DataType);
|
9
|
-
|
10
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
|
-
|
12
10
|
/**
|
13
11
|
* Different calendar types.
|
14
12
|
*/
|
@@ -19,14 +17,11 @@ sap.ui.define(["exports", "./DataType"], function (_exports, _DataType) {
|
|
19
17
|
Buddhist: "Buddhist",
|
20
18
|
Persian: "Persian"
|
21
19
|
};
|
22
|
-
|
23
20
|
class CalendarType extends _DataType.default {
|
24
21
|
static isValid(value) {
|
25
22
|
return !!CalendarTypes[value];
|
26
23
|
}
|
27
|
-
|
28
24
|
}
|
29
|
-
|
30
25
|
CalendarType.generateTypeAccessors(CalendarTypes);
|
31
26
|
var _default = CalendarType;
|
32
27
|
_exports.default = _default;
|
@@ -5,7 +5,6 @@ sap.ui.define(["exports"], function (_exports) {
|
|
5
5
|
value: true
|
6
6
|
});
|
7
7
|
_exports.default = void 0;
|
8
|
-
|
9
8
|
/**
|
10
9
|
* Base class for all data types.
|
11
10
|
*
|
@@ -17,32 +16,25 @@ sap.ui.define(["exports"], function (_exports) {
|
|
17
16
|
*/
|
18
17
|
class DataType {
|
19
18
|
static isValid(value) {}
|
20
|
-
|
21
19
|
static attributeToProperty(attributeValue) {
|
22
20
|
return attributeValue;
|
23
21
|
}
|
24
|
-
|
25
22
|
static propertyToAttribute(propertyValue) {
|
26
23
|
return `${propertyValue}`;
|
27
24
|
}
|
28
|
-
|
29
25
|
static valuesAreEqual(value1, value2) {
|
30
26
|
return value1 === value2;
|
31
27
|
}
|
32
|
-
|
33
28
|
static generateTypeAccessors(types) {
|
34
29
|
Object.keys(types).forEach(type => {
|
35
30
|
Object.defineProperty(this, type, {
|
36
31
|
get() {
|
37
32
|
return types[type];
|
38
33
|
}
|
39
|
-
|
40
34
|
});
|
41
35
|
});
|
42
36
|
}
|
43
|
-
|
44
37
|
}
|
45
|
-
|
46
38
|
var _default = DataType;
|
47
39
|
_exports.default = _default;
|
48
40
|
});
|