@kontent-ai/smart-link
Version:
Kontent.ai Smart Link SDK allowing to automatically inject [smart links](https://docs.kontent.ai/tutorials/develop-apps/build-strong-foundation/set-up-editing-from-preview#a-using-smart-links) to Kontent.ai according to manually specified [HTML data attri
37 lines • 1.93 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DisableableFeature = exports.MetadataAttribute = exports.DataAttribute = void 0;
/**
* Data-attributes are used to get some Kontent related data from DOM.
* Data from data-attributes is used to generate smart links or iframe messages to Kontent.
* However, this data can also be used in rendering (e.g. HTML elements with element codename attribute
* have highlights).
*/
var DataAttribute;
(function (DataAttribute) {
DataAttribute["AddButtonInsertPosition"] = "data-kontent-add-button-insert-position";
DataAttribute["ElementCodename"] = "data-kontent-element-codename";
DataAttribute["ComponentId"] = "data-kontent-component-id";
DataAttribute["ItemId"] = "data-kontent-item-id";
DataAttribute["LanguageCodename"] = "data-kontent-language-codename";
DataAttribute["EnvironmentId"] = "data-kontent-environment-id";
})(DataAttribute || (exports.DataAttribute = DataAttribute = {}));
/**
* Metadata-attributes are used to get some metadata about some of the SDK features.
* Metadata is used for SDK inner logic (such as rendering, event handling, etc.).
*/
var MetadataAttribute;
(function (MetadataAttribute) {
MetadataAttribute["AddButton"] = "data-kontent-add-button";
MetadataAttribute["AddButtonRenderPosition"] = "data-kontent-add-button-render-position";
MetadataAttribute["DisableFeatures"] = "data-kontent-disable-features";
})(MetadataAttribute || (exports.MetadataAttribute = MetadataAttribute = {}));
/**
* Valid values of the MetadataAttribute.DisableFeatures attribute.
* Those values can be used to disable certain features for the selected node.
*/
var DisableableFeature;
(function (DisableableFeature) {
DisableableFeature["Highlight"] = "highlight";
})(DisableableFeature || (exports.DisableableFeature = DisableableFeature = {}));
//# sourceMappingURL=attributes.js.map