Build public code

This commit is contained in:
Josua Vogel 2022-03-14 15:57:05 +01:00
parent 76780ccc34
commit 490e341db5
7 changed files with 21 additions and 18 deletions

View File

@ -399,7 +399,7 @@ function () {
selected: !!option.selected,
disabled: option.disabled || option.parentNode.disabled,
placeholder: option.value === '' || option.hasAttribute('placeholder'),
customProperties: _this._parseCustomProperties(option.dataset['customProperties'])
customProperties: (0, utils_1.parseCustomProperties)(option.dataset.customProperties)
});
});
}
@ -2503,18 +2503,6 @@ function () {
return null;
};
Choices.prototype._parseCustomProperties = function (customProperties) {
if (typeof customProperties !== 'undefined') {
try {
return JSON.parse(customProperties);
} catch (e) {
return customProperties;
}
}
return {};
};
return Choices;
}();
@ -3768,7 +3756,7 @@ Object.defineProperty(exports, "__esModule", ({
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.diff = exports.cloneObject = exports.existsInArray = exports.dispatchEvent = exports.sortByScore = exports.sortByAlpha = exports.strToEl = exports.sanitise = exports.isScrolledIntoView = exports.getAdjacentEl = exports.wrap = exports.isType = exports.getType = exports.generateId = exports.generateChars = exports.getRandomNumber = void 0;
exports.parseCustomProperties = exports.diff = exports.cloneObject = exports.existsInArray = exports.dispatchEvent = exports.sortByScore = exports.sortByAlpha = exports.strToEl = exports.sanitise = exports.isScrolledIntoView = exports.getAdjacentEl = exports.wrap = exports.isType = exports.getType = exports.generateId = exports.generateChars = exports.getRandomNumber = void 0;
var getRandomNumber = function (min, max) {
return Math.floor(Math.random() * (max - min) + min);
@ -3971,6 +3959,20 @@ var diff = function (a, b) {
exports.diff = diff;
var parseCustomProperties = function (customProperties) {
if (typeof customProperties !== 'undefined') {
try {
return JSON.parse(customProperties);
} catch (e) {
return customProperties;
}
}
return {};
};
exports.parseCustomProperties = parseCustomProperties;
/***/ }),
/***/ 273:

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
/*! choices.js v10.1.0 | © 2022 Josh Johnson | https://github.com/jshjohnson/Choices#readme */

View File

@ -213,7 +213,6 @@ declare class Choices implements Choices {
_setChoiceOrItem(item: any): void;
_findAndSelectChoiceByValue(value: string): void;
_generatePlaceholderValue(): string | null;
_parseCustomProperties(customProperties: any): any;
}
export default Choices;
//# sourceMappingURL=choices.d.ts.map

File diff suppressed because one or more lines are too long

View File

@ -23,5 +23,6 @@ export declare const cloneObject: (obj: object) => object;
* Returns an array of keys present on the first but missing on the second object
*/
export declare const diff: (a: Record<string, any>, b: Record<string, any>) => string[];
export declare const parseCustomProperties: (customProperties: any) => any;
export {};
//# sourceMappingURL=utils.d.ts.map

View File

@ -1 +1 @@
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/lib/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,eAAO,MAAM,eAAe,QAAS,MAAM,OAAO,MAAM,KAAG,MACZ,CAAC;AAEhD,eAAO,MAAM,aAAa,WAAY,MAAM,KAAG,MAC6B,CAAC;AAE7E,eAAO,MAAM,UAAU,YACZ,gBAAgB,GAAG,iBAAiB,UACrC,MAAM,KACb,MASF,CAAC;AAEF,eAAO,MAAM,OAAO,QAAS,GAAG,KAAG,MACe,CAAC;AAEnD,eAAO,MAAM,MAAM,SAAU,MAAM,OAAO,GAAG,KAAG,OACY,CAAC;AAE7D,eAAO,MAAM,IAAI,YACN,WAAW,YACX,WAAW,KACnB,WAUF,CAAC;AAEF,eAAO,MAAM,aAAa,YACf,OAAO,YACN,MAAM,yBAEf,OAYF,CAAC;AAEF,eAAO,MAAM,kBAAkB,YACpB,WAAW,UACZ,WAAW,yBAElB,OAkBF,CAAC;AAEF,eAAO,MAAM,QAAQ,sCAUpB,CAAC;AAEF,eAAO,MAAM,OAAO,QAAe,MAAM,KAAK,OAc1C,CAAC;AAEL,UAAU,eAAe;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC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