Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
META-INF.resources.butterfaces-dist-js.butterfaces-trivial-components-wrapper.js Maven / Gradle / Ivy
///
///
var ButterFaces;
(function (ButterFaces) {
function createTrivialTagComponent($input, options) {
return new TrivialComponents.TrivialTagComboBox($input, {
autoComplete: options.autoComplete,
allowFreeText: true,
showTrigger: options.showTrigger,
distinct: options.distinct,
editingMode: options.editingMode,
matchingOptions: {
matchingMode: "contains",
ignoreCase: true,
maxLevenshteinDistance: 0
},
maxSelectedEntries: options.maxSelectedEntries,
selectedEntries: options.selectedEntries,
freeTextSeparators: options.freeTextSeparators,
entries: options.entries,
valueFunction: function (entries) {
return entries
.map(function (entry) { return entry.id != null ? entry.id : entry.title; })
.join(",");
},
freeTextEntryFactory: function (freeText) {
return { title: escapeHtml(freeText) };
},
entryRenderingFunction: function (entry) { return "" + entry.title + "
"; },
});
function escapeHtml(source) {
/* tslint:disable */
var entityMap = {
"&": "&",
"<": "<",
">": ">",
'"': """,
"'": "'",
"/": "/"
};
/* tslint:enable */
return source.replace(/[&<>"'\/]/g, function (s) { return entityMap[s]; });
}
}
ButterFaces.createTrivialTagComponent = createTrivialTagComponent;
function createTrivialTreeComponent($input, options) {
return new TrivialComponents.TrivialTree($input, {
searchBarMode: options.searchBarMode,
selectedEntryId: options.selectedEntryId,
performanceOptimizationSettings: options.performanceOptimizationSettings,
entryRenderingFunction: function (entry, depth) { return Mustache.render(options.templates[Math.min(options.templates.length - 1, depth)], entry); },
spinnerTemplate: options.spinnerTemplate,
noEntriesTemplate: options.noEntriesTemplate,
entries: options.entries,
queryFunction: TrivialComponents.customTreeQueryFunctionFactory(options.entries, "children", "expanded", function (entry, queryString, nodeDepth) {
// TODO remove null parameter after trivial component is fixed
var titleMatches = entry.title && TrivialComponents.trivialMatch(entry.title, queryString, null).length > 0;
var descriptionMatches = entry.description && TrivialComponents.trivialMatch(entry.description, queryString, null).length > 0;
return titleMatches || descriptionMatches;
})
});
}
ButterFaces.createTrivialTreeComponent = createTrivialTreeComponent;
function createTrivialComboBox($input, options) {
return new TrivialComponents.TrivialComboBox($input, {
allowFreeText: false,
entryToEditorTextFunction: function (entry) { return entry[options.inputTextProperty]; },
entryRenderingFunction: function (entry) {
return Mustache.render(options.template, entry);
},
selectedEntryRenderingFunction: function (entry) {
if (!entry || entry._isEmptyEntry) {
return options.emptyEntryTemplate || "";
}
else if (options.selectedEntryTemplate) {
return Mustache.render(options.selectedEntryTemplate, entry);
}
else {
return Mustache.render(options.template, entry);
}
},
editingMode: options.editingMode,
showClearButton: options.showClearButton,
selectedEntry: options.selectedEntry,
spinnerTemplate: options.spinnerTemplate,
noEntriesTemplate: options.noEntriesTemplate,
entries: options.entries
});
}
ButterFaces.createTrivialComboBox = createTrivialComboBox;
function createTrivialTreeComboBox($input, options) {
return new TrivialComponents.TrivialTreeComboBox($input, {
allowFreeText: false,
entryToEditorTextFunction: function (entry) { return entry[options.inputTextProperty]; },
entryRenderingFunction: function (entry, depth) { return Mustache.render(options.templates[Math.min(options.templates.length - 1, depth)], entry); },
selectedEntryRenderingFunction: function (entry) {
if (!entry || entry._isEmptyEntry) {
return options.emptyEntryTemplate || "";
}
else if (options.selectedEntryTemplate) {
return Mustache.render(options.selectedEntryTemplate, entry);
}
else {
return Mustache.render(options.templates[0], entry);
}
},
editingMode: options.editingMode,
showClearButton: options.showClearButton,
selectedEntry: options.selectedEntry,
spinnerTemplate: options.spinnerTemplate,
noEntriesTemplate: options.noEntriesTemplate,
entries: options.entries,
queryFunction: TrivialComponents.customTreeQueryFunctionFactory(options.entries, "children", "expanded", function (entry, queryString, nodeDepth) {
// TODO remove null parameter after trivial component is fixed
var titleMatches = entry.title && TrivialComponents.trivialMatch(entry.title, queryString, null).length > 0;
var descriptionMatches = entry.description && TrivialComponents.trivialMatch(entry.description, queryString, null).length > 0;
return titleMatches || descriptionMatches;
})
});
}
ButterFaces.createTriv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G9Db21wbGV0ZTogYm9vbGVhbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzdGluY3Q6IGJvb2xlYW4sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVkaXRpbmdNb2RlOiBUcml2aWFsQ29tcG9uZW50cy5FZGl0aW5nTW9kZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF4U2VsZWN0ZWRFbnRyaWVzOiBudW1iZXIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkRW50cmllczogQnV0dGVyRmFjZXNUcml2aWFsRW50cnlbXSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJlZVRleHRTZXBhcmF0b3JzOiBzdHJpbmdbXSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW50cmllczogQnV0dGVyRmFjZXNUcml2aWFsRW50cnlbXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pOiBUcml2aWFsQ29tcG9uZW50cy5Ucml2aWFsVGFnQ29tYm9Cb3g8QnV0dGVyRmFjZXNUcml2aWFsRW50cnk+IHtcbiAgICAgICAgcmV0dXJuIG5ldyBUcml2aWFsQ29tcG9uZW50cy5Ucml2aWFsVGFnQ29tYm9Cb3g8QnV0dGVyRmFjZXNUcml2aWFsRW50cnk+KCRpbnB1dCwge1xuXG4gICAgICAgICAgICBhdXRvQ29tcGxldGU6IG9wdGlvbnMuYXV0b0NvbXBsZXRlLFxuICAgICAgICAgICAgYWxsb3dGcmVlVGV4dDogdHJ1ZSxcbiAgICAgICAgICAgIHNob3dUcmlnZ2VyOiBvcHRpb25zLnNob3dUcmlnZ2VyLFxuICAgICAgICAgICAgZGlzdGluY3Q6IG9wdGlvbnMuZGlzdGluY3QsXG4gICAgICAgICAgICBlZGl0aW5nTW9kZTogb3B0aW9ucy5lZGl0aW5nTW9kZSxcbiAgICAgICAgICAgIG1hdGNoaW5nT3B0aW9uczoge1xuICAgICAgICAgICAgICAgIG1hdGNoaW5nTW9kZTogXCJjb250YWluc1wiLFxuICAgICAgICAgICAgICAgIGlnbm9yZUNhc2U6IHRydWUsXG4gICAgICAgICAgICAgICAgbWF4TGV2ZW5zaHRlaW5EaXN0YW5jZTogMFxuICAgICAgICAgICAgfSxcblxuICAgICAgICAgICAgbWF4U2VsZWN0ZWRFbnRyaWVzOiBvcHRpb25zLm1heFNlbGVjdGVkRW50cmllcyxcbiAgICAgICAgICAgIHNlbGVjdGVkRW50cmllczogb3B0aW9ucy5zZWxlY3RlZEVudHJpZXMsXG4gICAgICAgICAgICBmcmVlVGV4dFNlcGFyYXRvcnM6IG9wdGlvbnMuZnJlZVRleHRTZXBhcmF0b3JzIGFzIGFueSwgLy8gVE9ETyByZW1vdmUgdGhpcyBjYXN0IHdoZW4gdHJpdmlhbCBjb21wb25lbnRzIGlzIGZpeGVkXG4gICAgICAgICAgICBlbnRyaWVzOiBvcHRpb25zLmVudHJpZXMsXG5cbiAgICAgICAgICAgIHZhbHVlRnVuY3Rpb246IGVudHJpZXMgPT4ge1xuICAgICAgICAgICAgICAgIHJldHVybiBlbnRyaWVzXG4gICAgICAgICAgICAgICAgICAgIC5tYXAoZW50cnkgPT4gKGVudHJ5IGFzIGFueSkuaWQgIT0gbnVsbCA/IChlbnRyeSBhcyBhbnkpLmlkIDogKGVudHJ5IGFzIGFueSkudGl0bGUpXG4gICAgICAgICAgICAgICAgICAgIC5qb2luKFwiLFwiKTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBmcmVlVGV4dEVudHJ5RmFjdG9yeTogZnJlZVRleHQgPT4ge1xuICAgICAgICAgICAgICAgIHJldHVybiB7dGl0bGU6IGVzY2FwZUh0bWwoZnJlZVRleHQpfTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBlbnRyeVJlbmRlcmluZ0Z1bmN0aW9uOiBlbnRyeSA9PiBgPGRpdj4keyhlbnRyeSBhcyBhbnkpLnRpdGxlfTwvZGl2PmAsIC8vIFRPRE8gdGVtcGxhdGUgcGFyYW1ldGVyXG4gICAgICAgIH0pO1xuXG4gICAgICAgIGZ1bmN0aW9uIGVzY2FwZUh0bWwoc291cmNlOiBzdHJpbmcpIHtcbiAgICAgICAgICAgIC8qIHRzbGludDpkaXNhYmxlICovXG4gICAgICAgICAgICBjb25zdCBlbnRpdHlNYXAgPSB7XG4gICAgICAgICAgICAgICAgXCImXCI6IFwiJmFtcDtcIixcbiAgICAgICAgICAgICAgICBcIjxcIjogXCImbHQ7XCIsXG4gICAgICAgICAgICAgICAgXCI+XCI6IFwiJmd0O1wiLFxuICAgICAgICAgICAgICAgICdcIic6IFwiJnF1b3Q7XCIsXG4gICAgICAgICAgICAgICAgXCInXCI6IFwiJiMzOTtcIixcbiAgICAgICAgICAgICAgICBcIi9cIjogXCImI3gyRjtcIlxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIC8qIHRzbGludDplbmFibGUgKi9cblxuICAgICAgICAgICAgcmV0dXJuIHNvdXJjZS5yZXBsYWNlKC9bJjw+XCInXFwvXS9nLCBzID0+IGVudGl0eU1hcFtzXSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBpbnRlcmZhY2UgQnV0dGVyRmFjZXNUcml2aWFsVHJlZUVudHJ5IHtcbiAgICAgICAgdGl0bGU6IHN0cmluZztcbiAgICAgICAgZGVzY3JpcHRpb246IHN0cmluZztcbiAgICAgICAgaWQ6IG51bWJlcjtcbiAgICB9XG5cbiAgICBleHBvcnQgZnVuY3Rpb24gY3JlYXRlVHJpdmlhbFRyZWVDb21wb25lbnQoJGlucHV0OiBzdHJpbmcsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnM6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlYXJjaEJhck1vZGU6IFRyaXZpYWxDb21wb25lbnRzLlNlYXJjaEJhck1vZGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZEVudHJ5SWQ6IG51bWJlcixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBlcmZvcm1hbmNlT3B0aW1pemF0aW9uU2V0dGluZ3M6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b01hbnlWaXNpYmxlSXRlbXNSZW5kZXJEZWxheTogbnVtYmVyLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvTWFueVZpc2libGVJdGVtc1RocmVzaG9sZDogbnVtYmVyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcGxhdGVzOiBzdHJpbmdbXSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNwaW5uZXJUZW1wbGF0ZTogc3RyaW5nLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbm9FbnRyaWVzVGVtcGxhdGU6IHN0cmluZyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVudHJpZXM6IEJ1dHRlckZhY2VzVHJpdmlhbFRyZWVFbnRyeVtdXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pOiBUcml2aWFsQ29tcG9uZW50cy5Ucml2aWFsVHJlZTxCdXR0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y8gVE9ETyByZW1vdmUgbnVsbCBwYXJhbWV0ZXIgYWZ0ZXIgdHJpdmlhbCBjb21wb25lbnQgaXMgZml4ZWRcbiAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlTWF0Y2hlcyA9IGVudHJ5LnRpdGxlICYmIFRyaXZpYWxDb21wb25lbnRzLnRyaXZpYWxNYXRjaChlbnRyeS50aXRsZSwgcXVlcnlTdHJpbmcsIG51bGwpLmxlbmd0aCA+IDA7XG4gICAgICAgICAgICAgICAgICAgIGxldCBkZXNjcmlwdGlvbk1hdGNoZXMgPSBlbnRyeS5kZXNjcmlwdGlvbiAmJiBUcml2aWFsQ29tcG9uZW50cy50cml2aWFsTWF0Y2goZW50cnkuZGVzY3JpcHRpb24sIHF1ZXJ5U3RyaW5nLCBudWxsKS5sZW5ndGggPiAwO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGl0bGVNYXRjaGVzIHx8IGRlc2NyaXB0aW9uTWF0Y2hlcztcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICB9KTtcbiAgICB9XG5cblxuICAgIGV4cG9ydCBmdW5jdGlvbiBjcmVhdGVUcml2aWFsQ29tYm9Cb3goJGlucHV0OiBzdHJpbmcsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXRUZXh0UHJvcGVydHk6IHN0cmluZyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbXB0eUVudHJ5VGVtcGxhdGU6IHN0cmluZyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlZGl0aW5nTW9kZTogVHJpdmlhbENvbXBvbmVudHMuRWRpdGluZ01vZGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2hvd0NsZWFyQnV0dG9uOiBib29sZWFuLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkRW50cnk6IEJ1dHRlckZhY2VzVHJpdmlhbEVudHJ5LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkRW50cnlUZW1wbGF0ZTogc3RyaW5nLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBsYXRlOiBzdHJpbmcsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3Bpbm5lclRlbXBsYXRlOiBzdHJpbmcsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbm9FbnRyaWVzVGVtcGxhdGU6IHN0cmluZyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbnRyaWVzOiBCdXR0ZXJGYWNlc1RyaXZpYWxFbnRyeVtdXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTogVHJpdmlhbENvbXBvbmVudHMuVHJpdmlhbENvbWJvQm94PEJ1dHRlckZhY2VzVHJpdmlhbEVudHJ5PiB7XG4gICAgICAgIHJldHVybiBuZXcgVHJpdmlhbENvbXBvbmVudHMuVHJpdmlhbENvbWJvQm94PEJ1dHRlckZhY2VzVHJpdmlhbEVudHJ5PigkaW5wdXQsIHtcbiAgICAgICAgICAgIGFsbG93RnJlZVRleHQ6IGZhbHNlLFxuICAgICAgICAgICAgZW50cnlUb0VkaXRvclRleHRGdW5jdGlvbjogZW50cnkgPT4gZW50cnlbb3B0aW9ucy5pbnB1dFRleHRQcm9wZXJ0eV0sXG4gICAgICAgICAgICBlbnRyeVJlbmRlcmluZ0Z1bmN0aW9uOiBlbnRyeSA9PiB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIE11c3RhY2hlLnJlbmRlcihvcHRpb25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gY3JlYXRlVHJpdmlhbFRyZWVDb21ib0JveCgkaW5wdXQ6IHN0cmluZyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcHRpb25zOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlucHV0VGV4dFByb3BlcnR5OiBzdHJpbmcsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVtcHR5RW50cnlUZW1wbGF0ZTogc3RyaW5nLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlZGl0aW5nTW9kZTogVHJpdmlhbENvbXBvbmVudHMuRWRpdGluZ01vZGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNob3dDbGVhckJ1dHRvbjogYm9vbGVhbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWRFbnRyeTogQnV0dGVyRmFjZXNUcml2aWFsRW50cnksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkRW50cnlUZW1wbGF0ZTogc3RyaW5nLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wbGF0ZXM6IHN0cmluZ1tdLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzcGlubmVyVGVtcGxhdGU6IHN0cmluZyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbm9FbnRyaWVzVGVtcGxhdGU6IHN0cmluZyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW50cmllczogQnV0dGVyRmFjZXNUcml2aWFsRW50cnlbXVxuICAgICA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