forked from FINAKON/HelpProject
1. Initial Commit - a boiler plate code and POC to realize the concept of context sensitive help 2. Frontend code written in ReactJS 3. Backend code written in Java, Spring Boot Framework 4. Frontend Start: pre-requisites : node, npm npm run dev ==> to start the frontend vite server 5. Backend Start: pre-requisites : java, mvn mvn spring-boot:run ==> to start the backend server 6. Visit http://localhost:5173/ for basic demo of help, press F1 in textboxes 7. Visit http://localhost:5173/editor and enter "admin123" to add/modify texts. Happy Coding !!! Thank you, Bhargava.
47 lines
1.5 KiB
JavaScript
47 lines
1.5 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.camelCase = void 0;
|
|
var CUSTOM_PROPERTY_REGEX = /^--[a-zA-Z0-9_-]+$/;
|
|
var HYPHEN_REGEX = /-([a-z])/g;
|
|
var NO_HYPHEN_REGEX = /^[^-]+$/;
|
|
var VENDOR_PREFIX_REGEX = /^-(webkit|moz|ms|o|khtml)-/;
|
|
var MS_VENDOR_PREFIX_REGEX = /^-(ms)-/;
|
|
/**
|
|
* Checks whether to skip camelCase.
|
|
*/
|
|
var skipCamelCase = function (property) {
|
|
return !property ||
|
|
NO_HYPHEN_REGEX.test(property) ||
|
|
CUSTOM_PROPERTY_REGEX.test(property);
|
|
};
|
|
/**
|
|
* Replacer that capitalizes first character.
|
|
*/
|
|
var capitalize = function (match, character) {
|
|
return character.toUpperCase();
|
|
};
|
|
/**
|
|
* Replacer that removes beginning hyphen of vendor prefix property.
|
|
*/
|
|
var trimHyphen = function (match, prefix) { return "".concat(prefix, "-"); };
|
|
/**
|
|
* CamelCases a CSS property.
|
|
*/
|
|
var camelCase = function (property, options) {
|
|
if (options === void 0) { options = {}; }
|
|
if (skipCamelCase(property)) {
|
|
return property;
|
|
}
|
|
property = property.toLowerCase();
|
|
if (options.reactCompat) {
|
|
// `-ms` vendor prefix should not be capitalized
|
|
property = property.replace(MS_VENDOR_PREFIX_REGEX, trimHyphen);
|
|
}
|
|
else {
|
|
// for non-React, remove first hyphen so vendor prefix is not capitalized
|
|
property = property.replace(VENDOR_PREFIX_REGEX, trimHyphen);
|
|
}
|
|
return property.replace(HYPHEN_REGEX, capitalize);
|
|
};
|
|
exports.camelCase = camelCase;
|
|
//# sourceMappingURL=utilities.js.map
|