@wavemaker/app-ng-runtime 12.0.0-next.45061 → 12.0.0-next.45062
Sign up to get free protection for your applications and to get access to all the features.
- app-ng-runtime/components/input/rating/bundles/index.umd.js +26 -35
- app-ng-runtime/components/input/rating/esm2022/rating.component.mjs +26 -37
- app-ng-runtime/components/input/rating/esm2022/rating.props.mjs +3 -1
- app-ng-runtime/components/input/rating/fesm2022/index.mjs +27 -36
- app-ng-runtime/components/input/rating/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/input/rating/rating.component.d.ts +3 -1
- app-ng-runtime/package.json +1 -1
- app-ng-runtime/scripts/custom-widgets-m3/src/checkbox_set/checkbox_set.d.ts +0 -0
- app-ng-runtime/scripts/custom-widgets-m3/src/checkbox_set/checkbox_set.js +0 -38
- app-ng-runtime/scripts/custom-widgets-m3/src/checkbox_set/page.min.d.ts +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/checkbox_set/page.min.js +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/discrete_slider/discrete_slider.d.ts +0 -10
- app-ng-runtime/scripts/custom-widgets-m3/src/discrete_slider/discrete_slider.js +0 -171
- app-ng-runtime/scripts/custom-widgets-m3/src/discrete_slider/page.min.d.ts +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/discrete_slider/page.min.js +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/divider/divider.d.ts +0 -0
- app-ng-runtime/scripts/custom-widgets-m3/src/divider/divider.js +0 -28
- app-ng-runtime/scripts/custom-widgets-m3/src/divider/page.min.d.ts +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/divider/page.min.js +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/icon_button/icon_button.d.ts +0 -0
- app-ng-runtime/scripts/custom-widgets-m3/src/icon_button/icon_button.js +0 -24
- app-ng-runtime/scripts/custom-widgets-m3/src/icon_button/page.min.d.ts +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/icon_button/page.min.js +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/input_chip/input_chip.d.ts +0 -0
- app-ng-runtime/scripts/custom-widgets-m3/src/input_chip/input_chip.js +0 -34
- app-ng-runtime/scripts/custom-widgets-m3/src/input_chip/input_chip.variables.d.ts +0 -0
- app-ng-runtime/scripts/custom-widgets-m3/src/input_chip/input_chip.variables.js +0 -1
- app-ng-runtime/scripts/custom-widgets-m3/src/input_chip/page.min.d.ts +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/input_chip/page.min.js +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/payee_list/page.min.d.ts +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/payee_list/page.min.js +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/payee_list/payee_list.d.ts +0 -0
- app-ng-runtime/scripts/custom-widgets-m3/src/payee_list/payee_list.js +0 -19
- app-ng-runtime/scripts/custom-widgets-m3/src/progressbar/page.min.d.ts +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/progressbar/page.min.js +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/progressbar/progressbar.d.ts +0 -0
- app-ng-runtime/scripts/custom-widgets-m3/src/progressbar/progressbar.js +0 -52
- app-ng-runtime/scripts/custom-widgets-m3/src/radio_set/page.min.d.ts +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/radio_set/page.min.js +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/radio_set/radio_set.d.ts +0 -0
- app-ng-runtime/scripts/custom-widgets-m3/src/radio_set/radio_set.js +0 -35
- app-ng-runtime/scripts/custom-widgets-m3/src/slider/page.min.d.ts +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/slider/page.min.js +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/slider/slider.d.ts +0 -11
- app-ng-runtime/scripts/custom-widgets-m3/src/slider/slider.js +0 -121
- app-ng-runtime/scripts/custom-widgets-m3/src/switch_button/page.min.d.ts +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/switch_button/page.min.js +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/switch_button/switch_button.d.ts +0 -0
- app-ng-runtime/scripts/custom-widgets-m3/src/switch_button/switch_button.js +0 -33
- app-ng-runtime/scripts/custom-widgets-m3/src/textfield/page.min.d.ts +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/textfield/page.min.js +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/textfield/textfield.d.ts +0 -4
- app-ng-runtime/scripts/custom-widgets-m3/src/textfield/textfield.js +0 -65
- app-ng-runtime/scripts/custom-widgets-m3/src/widget-registry.d.ts +0 -6
- app-ng-runtime/scripts/custom-widgets-m3/src/widget-registry.js +0 -68
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/input/rating/src/rating.props.ts","../../../../../projects/components/widgets/input/rating/src/rating.component.html","../../../../../projects/components/widgets/input/rating/src/rating.component.ts","../../../../../projects/components/widgets/input/rating/src/rating.module.ts","../../../../../projects/components/widgets/input/rating/src/index.ts"],"sourcesContent":["import { PROP_ANY, PROP_BOOLEAN, PROP_NUMBER, PROP_STRING, register, registerFormWidget } from '@wm/components/base';\nimport { FormWidgetType } from '@wm/core';\n\nexport const ratingProps = new Map(\n [\n ['caption', PROP_STRING],\n ['class', PROP_STRING],\n ['datafield', PROP_STRING],\n ['dataset', PROP_ANY],\n ['datavaluesource', PROP_ANY],\n ['datavalue', PROP_STRING],\n ['displayexpression', PROP_STRING],\n ['displayfield', PROP_STRING],\n ['iconcolor', PROP_STRING],\n ['iconsize', PROP_STRING],\n ['maxvalue', {value: 5, ...PROP_NUMBER}],\n ['name', PROP_STRING],\n ['orderby', PROP_STRING],\n ['readonly', PROP_BOOLEAN],\n ['show', {value: true, ...PROP_BOOLEAN}],\n ['showcaptions', {value: true, ...PROP_BOOLEAN}],\n ['tabindex', {value: 0, ...PROP_NUMBER}],\n ['usekeys', PROP_BOOLEAN]\n ]\n);\n\nexport const registerProps = () => {\n register(\n 'wm-rating',\n ratingProps\n );\n registerFormWidget(\n FormWidgetType.RATING,\n new Map(ratingProps)\n );\n};\n","<div (focus)=\"onFocus($event)\" [(ngModel)]=\"modelByKey\" [ngModelOptions]=\"{standalone: true}\" aria-multiselectable=\"true\"\n class=\"ratings-wrapper\" ngDefaultControl>\n <div *ngIf=\"!readonly\" class=\"rating-style\">\n <label *ngFor=\"let rate of ratingItems;\"\n [ngClass]=\"{active : rate.index <= selectedRatingValue}\"\n [ngStyle]=\"{'font-size' :iconsize, color: rate.index <= selectedRatingValue && iconcolor}\"\n [title]=\"rate.label || rate.index\"\n (touchstart)=\"onTouchStart($event)\"\n (mouseleave)=\"onMouseleave($event, rate)\"\n (mouseover)=\"onMouseOver($event, rate)\"\n [for]=\"_id + '-' + rate.index\">\n <input #ratingInput type=\"radio\" role=\"radio\" [attr.aria-label]=\"(rate.label || rate.index) + ' out of ' + ratingItems.length + ' ratings'\" [attr.aria-checked]=\"rate.label === datavalue ? 'true' : 'false'\"\n [id]=\"_id + '-' + rate.index\" (click)=\"onRatingClick($event, rate)\" name=\"ratings-id\" [value]=\"rate.key || rate.index\"/>\n </label>\n </div>\n <div [class.hidden]=\"!readonly\" [ngStyle]=\"{'font-size' :iconsize}\" class=\"ratings-container disabled\" >\n <div class=\"ratings active\" [ngStyle]=\"{width: ratingsWidth, color: iconcolor}\"></div>\n </div>\n <label *ngIf=\"showcaptions\" class=\"caption\" [textContent]=\"caption\"></label>\n</div>\n","import {Component, ElementRef, Inject, Injector, Optional, ViewChild} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport {generateGUId, setCSS, noop} from '@wm/core';\nimport { getOrderedDataset, provideAs, provideAsWidgetRef, styler } from '@wm/components/base';\nimport { DatasetAwareFormComponent } from '@wm/components/input';\n\nimport { registerProps } from './rating.props';\nimport {find, isEmpty, isUndefined, slice, toString} from \"lodash-es\";\n\nconst DEFAULT_CLS = 'app-ratings';\nconst WIDGET_CONFIG = {widgetType: 'wm-rating', hostClass: DEFAULT_CLS};\n\nconst MAX_RATING = 10;\nconst DEFAULT_RATING = 5;\n\n@Component({\n selector: '[wmRating]',\n templateUrl: './rating.component.html',\n providers: [\n provideAs(RatingComponent, NG_VALUE_ACCESSOR, true),\n provideAsWidgetRef(RatingComponent)\n ]\n})\nexport class RatingComponent extends DatasetAwareFormComponent {\n static initializeProps = registerProps();\n\n public caption: string;\n public showcaptions: boolean;\n public maxvalue;\n\n private _selectedRatingValue;\n public ratingsWidth;\n private ratingItems;\n private _id;\n\n public iconsize: string;\n public iconcolor: string;\n public onFocus: any;\n private touchEnabled:boolean;\n @ViewChild('ratingInput', /* TODO: add static flag */ { read: ElementRef }) ratingEl: ElementRef;\n\n get selectedRatingValue() {\n return this._selectedRatingValue;\n }\n\n set selectedRatingValue(val) {\n this._selectedRatingValue = val;\n this.calculateRatingsWidth();\n }\n\n constructor(inj: Injector, @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any) {\n super(inj, WIDGET_CONFIG, explicitContext);\n this._id = generateGUId();\n styler(this.nativeElement, this);\n\n // prepare the rating options on dataset ready.\n const datasetSubscription = this.dataset$.subscribe(() => {\n this.prepareRatingDataset();\n });\n this.registerDestroyListener(() => datasetSubscription.unsubscribe());\n\n // listen to changes in datavalue.\n const datavalueSubscription = this.datavalue$.subscribe(() => this.onDatavalueChange(this.datavalue));\n this.registerDestroyListener(() => datavalueSubscription.unsubscribe());\n }\n\n // Change event is registered from the template, Prevent the framework from registering one more event\n protected handleEvent(node: HTMLElement, eventName: string, eventCallback: Function, locals: any) {\n if (eventName !== 'change' && eventName !== 'blur') {\n super.handleEvent(this.ratingEl.nativeElement, eventName, eventCallback, locals);\n }\n }\n\n // This function returns the rating widget dataset containing the index, value and label\n private prepareRatingDataset() {\n if (!this.datasetItems.length) {\n this.ratingItems = [];\n this.caption = '';\n }\n\n let ratingItems = [];\n let data = this.datasetItems;\n const maxvalue = parseInt(this.maxvalue || this.datasetItems.length, 10);\n const maxValue = (maxvalue > MAX_RATING ? MAX_RATING : maxvalue) || DEFAULT_RATING;\n\n /**\n * 1. If datasetItems.length is more than maxValue (i.e. 10 ratings) then just extract maxValue of items from datasetItems.\n * 2. If datasetItems are not available then prepare ratings value depending on maxvalue. eg: 1,2,3 .. upto maxvalue\n * 3. If maxvalue / i value is more than datasetItems length, prepare default rating items for i values more than datasetItems.length\n */\n if (data.length && data.length > maxValue) {\n data = slice(data, 0, maxValue);\n }\n\n for (let i = maxValue; i > 0; i--) {\n if (!data.length) {\n ratingItems.push({key: i, value: i, index: i, label: i});\n } else {\n if (i > data.length) {\n ratingItems.push({key: i, value: i, index: i, label: i});\n } else {\n data = getOrderedDataset(data, 'index:desc');\n ratingItems = ratingItems.concat(data);\n break;\n }\n }\n }\n\n this.ratingItems = ratingItems;\n if (!data.length) { // constructs default datasetItems when there is no dataset binding.\n this.datasetItems = ratingItems;\n }\n this.onDatavalueChange(this.datavalue);\n }\n\n onRatingClick($event, rate) {\n this.modelByKey = rate.key;\n this.selectedRatingValue = rate.index;\n\n // support if the caption is binded in the old projects for backward compatibility\n if (!this.showcaptions) {\n this.caption = rate.label;\n }\n\n this.invokeOnTouched();\n // invoke on datavalue change.\n this.invokeOnChange(this.datavalue, $event || {}, true);\n }\n\n // Update the selected flag on datasetItems and assign the ratingValue.\n /**\n * On datavalue change, update the caption, selectedRatingValue.\n * 1. if datasetItems contain the selected item (check the selected flag on item), find the index of selected item.\n * 2. if not, just check if the datavalue is provided as the index on the item.\n *\n * @param dataVal datavalue\n */\n onDatavalueChange(dataVal) {\n if (!isEmpty(this.datasetItems)) {\n let selectedItem = find(this.datasetItems, {'selected': true});\n\n if (!selectedItem && !isUndefined(dataVal)) {\n selectedItem = find(this.datasetItems, function (item) {\n return toString(item.index) === dataVal;\n });\n if (selectedItem) {\n selectedItem.selected = true;\n }\n }\n\n if (!selectedItem) {\n // reset the model if there is no item found.\n this.modelByKey = undefined;\n this.caption = '';\n }\n\n this.selectedRatingValue = selectedItem ? selectedItem.index : 0;\n if (selectedItem) {\n this.caption = selectedItem.label;\n }\n } else {\n this.selectedRatingValue = 0;\n }\n if (this.readonly) {\n // when dataset is not given but datavalue is provided which is integer\n if (!this.selectedRatingValue && !isNaN(dataVal)) {\n this.selectedRatingValue = (parseFloat(dataVal) <= this.maxvalue) ? dataVal : this.maxvalue;\n }\n this.ratingsWidth = this.calculateRatingsWidth(dataVal);\n }\n }\n\n calculateRatingsWidth(dataVal?: any) {\n const selectedRating = parseFloat(this.selectedRatingValue),\n starWidth = 0.925,\n maxValue = parseInt(this.maxvalue || this.datasetItems.length, 10) || DEFAULT_RATING;\n\n setCSS(\n this.nativeElement.querySelector('.ratings-container') as HTMLElement,\n 'width',\n (starWidth * maxValue) + 'em'\n );\n dataVal = dataVal || this.datavalue;\n if (dataVal === undefined || dataVal === '' || dataVal === null) {\n this.caption = '';\n return 0;\n }\n if (selectedRating <= maxValue && selectedRating >= 0) {\n return selectedRating * starWidth + 'em';\n }\n if (selectedRating > maxValue) {\n return maxValue * starWidth + 'em';\n }\n }\n\n onPropertyChange(key: string, nv: any, ov?: any) {\n if (key === 'readonly') {\n if (nv) {\n this.ratingsWidth = this.calculateRatingsWidth();\n }\n } else if (key === 'maxvalue') {\n /** Storing the datavalue in temp variable and assiging back to datavalue\n * after default datalist is prepared to trigger Dataset Aware class select cycle\n * as the datavalue property change is triggering first rather than maxvalue\n * in the rating widget is used inside a datatable\n */\n let tempDataValue = this.datavalue;\n this.prepareRatingDataset();\n // reset all the items.\n this.resetDatasetItems();\n if (!isUndefined(tempDataValue)) {\n this.datavalue = tempDataValue;\n }\n } else {\n super.onPropertyChange(key, nv, ov);\n }\n }\n\n /* Detect touch enabled devices & update hover styles*/\n onTouchStart($event) {\n this.touchEnabled = true;\n this.onTouchStart = noop;\n }\n onMouseleave() {\n this.caption = this.displayValue as string;\n }\n\n onMouseOver($event, rate) {\n this.caption = rate.label;\n !this.touchEnabled && !$event.target.classList.contains('rating-label-hover') && $event.target.classList.add('rating-label-hover');\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { WmComponentsModule } from '@wm/components/base';\n\nimport { RatingComponent } from './rating.component';\n\nconst components = [\n RatingComponent\n];\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n WmComponentsModule\n ],\n declarations: [...components],\n exports: [...components]\n})\nexport class RatingModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAGO,MAAM,WAAW,GAAG,IAAI,GAAG,CAC9B;IACI,CAAC,SAAS,EAAE,WAAW,CAAC;IACxB,CAAC,OAAO,EAAE,WAAW,CAAC;IACtB,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,SAAS,EAAE,QAAQ,CAAC;IACrB,CAAC,iBAAiB,EAAE,QAAQ,CAAC;IAC7B,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,mBAAmB,EAAE,WAAW,CAAC;IAClC,CAAC,cAAc,EAAE,WAAW,CAAC;IAC7B,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,UAAU,EAAE,WAAW,CAAC;IACzB,CAAC,UAAU,EAAE,EAAC,KAAK,EAAE,CAAC,EAAE,GAAG,WAAW,EAAC,CAAC;IACxC,CAAC,MAAM,EAAE,WAAW,CAAC;IACrB,CAAC,SAAS,EAAE,WAAW,CAAC;IACxB,CAAC,UAAU,EAAE,YAAY,CAAC;IAC1B,CAAC,MAAM,EAAE,EAAC,KAAK,EAAE,IAAI,EAAE,GAAG,YAAY,EAAC,CAAC;IACxC,CAAC,cAAc,EAAE,EAAC,KAAK,EAAE,IAAI,EAAE,GAAG,YAAY,EAAC,CAAC;IAChD,CAAC,UAAU,EAAE,EAAC,KAAK,EAAE,CAAC,EAAE,GAAG,WAAW,EAAC,CAAC;IACxC,CAAC,SAAS,EAAE,YAAY,CAAC;AAC5B,CAAA,CACJ,CAA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kBAAkB,aAPtB,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA,GAAA;;ACTnB;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/input/rating/src/rating.props.ts","../../../../../projects/components/widgets/input/rating/src/rating.component.html","../../../../../projects/components/widgets/input/rating/src/rating.component.ts","../../../../../projects/components/widgets/input/rating/src/rating.module.ts","../../../../../projects/components/widgets/input/rating/src/index.ts"],"sourcesContent":["import { PROP_ANY, PROP_BOOLEAN, PROP_NUMBER, PROP_STRING, register, registerFormWidget } from '@wm/components/base';\nimport { FormWidgetType } from '@wm/core';\n\nexport const ratingProps = new Map(\n [\n ['caption', PROP_STRING],\n ['class', PROP_STRING],\n ['datafield', PROP_STRING],\n ['dataset', PROP_ANY],\n ['datavaluesource', PROP_ANY],\n ['datavalue', PROP_STRING],\n ['displayexpression', PROP_STRING],\n ['displayfield', PROP_STRING],\n ['iconcolor', PROP_STRING],\n ['activeiconclass', {value: 'wi wi-star', ...PROP_STRING}],\n ['inactiveiconclass', {value: 'wi wi-star-border', ...PROP_STRING}],\n ['iconsize', PROP_STRING],\n ['maxvalue', {value: 5, ...PROP_NUMBER}],\n ['name', PROP_STRING],\n ['orderby', PROP_STRING],\n ['readonly', PROP_BOOLEAN],\n ['show', {value: true, ...PROP_BOOLEAN}],\n ['showcaptions', {value: true, ...PROP_BOOLEAN}],\n ['tabindex', {value: 0, ...PROP_NUMBER}],\n ['usekeys', PROP_BOOLEAN]\n ]\n);\n\nexport const registerProps = () => {\n register(\n 'wm-rating',\n ratingProps\n );\n registerFormWidget(\n FormWidgetType.RATING,\n new Map(ratingProps)\n );\n};\n","<div (focus)=\"onFocus($event)\" [(ngModel)]=\"modelByKey\" [ngModelOptions]=\"{standalone: true}\" aria-multiselectable=\"true\"\n class=\"ratings-wrapper\" ngDefaultControl>\n <div [class.disabled]=\"readonly\" class=\"rating-style\">\n <label *ngFor=\"let rate of ratingItems;\"\n [ngClass]=\"{active : rate.index <= selectedRatingValue}\"\n [ngStyle]=\"{'font-size' :iconsize, color: rate.index <= selectedRatingValue && iconcolor}\"\n [title]=\"rate.label || rate.index\"\n (touchstart)=\"onTouchStart($event)\"\n (mouseleave)=\"onMouseleave($event, rate)\"\n (mouseover)=\"onMouseOver($event, rate)\"\n [for]=\"_id + '-' + rate.index\">\n <i class=\"app-icon {{rate.index <= selectedRatingValue ? activeiconclass : inactiveiconclass}}\" aria-hidden=\"true\"></i>\n <input #ratingInput type=\"radio\" role=\"radio\" [attr.aria-label]=\"(rate.label || rate.index) + ' out of ' + ratingItems.length + ' ratings'\" [attr.aria-checked]=\"rate.label === datavalue ? 'true' : 'false'\"\n [id]=\"_id + '-' + rate.index\" (click)=\"onRatingClick($event, rate)\" name=\"ratings-id\" [value]=\"rate.key || rate.index\"/>\n </label>\n </div>\n <label *ngIf=\"showcaptions\" class=\"caption\" [textContent]=\"caption\"></label>\n</div>\n","import {Component, ElementRef, Inject, Injector, Optional, ViewChild} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport {generateGUId, setCSS, noop} from '@wm/core';\nimport { getOrderedDataset, provideAs, provideAsWidgetRef, styler } from '@wm/components/base';\nimport { DatasetAwareFormComponent } from '@wm/components/input';\n\nimport { registerProps } from './rating.props';\nimport {find, isEmpty, isUndefined, slice, toString} from \"lodash-es\";\n\nconst DEFAULT_CLS = 'app-ratings';\nconst WIDGET_CONFIG = {widgetType: 'wm-rating', hostClass: DEFAULT_CLS};\n\nconst MAX_RATING = 10;\nconst DEFAULT_RATING = 5;\n\n@Component({\n selector: '[wmRating]',\n templateUrl: './rating.component.html',\n providers: [\n provideAs(RatingComponent, NG_VALUE_ACCESSOR, true),\n provideAsWidgetRef(RatingComponent)\n ]\n})\nexport class RatingComponent extends DatasetAwareFormComponent {\n static initializeProps = registerProps();\n\n public caption: string;\n public showcaptions: boolean;\n public maxvalue;\n\n private _selectedRatingValue;\n public ratingsWidth;\n public ratingItems;\n private _id;\n\n public iconsize: string;\n public iconcolor: string;\n public onFocus: any;\n private touchEnabled:boolean;\n public activeiconclass: string = '';\n public inactiveiconclass: string = '';\n @ViewChild('ratingInput', /* TODO: add static flag */ { read: ElementRef }) ratingEl: ElementRef;\n\n get selectedRatingValue() {\n return this._selectedRatingValue;\n }\n\n set selectedRatingValue(val) {\n this._selectedRatingValue = val;\n this.calculateRatingsWidth();\n }\n\n constructor(inj: Injector, @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any) {\n super(inj, WIDGET_CONFIG, explicitContext);\n this._id = generateGUId();\n styler(this.nativeElement, this);\n\n // prepare the rating options on dataset ready.\n const datasetSubscription = this.dataset$.subscribe(() => {\n this.prepareRatingDataset();\n });\n this.registerDestroyListener(() => datasetSubscription.unsubscribe());\n\n // listen to changes in datavalue.\n const datavalueSubscription = this.datavalue$.subscribe(() => this.onDatavalueChange(this.datavalue));\n this.registerDestroyListener(() => datavalueSubscription.unsubscribe());\n }\n\n // Change event is registered from the template, Prevent the framework from registering one more event\n protected handleEvent(node: HTMLElement, eventName: string, eventCallback: Function, locals: any) {\n if (eventName !== 'change' && eventName !== 'blur') {\n super.handleEvent(this.ratingEl.nativeElement, eventName, eventCallback, locals);\n }\n }\n\n // This function returns the rating widget dataset containing the index, value and label\n private prepareRatingDataset() {\n if (!this.datasetItems.length) {\n this.ratingItems = [];\n this.caption = '';\n }\n\n let ratingItems = [];\n let data = this.datasetItems;\n const maxvalue = parseInt(this.maxvalue || this.datasetItems.length, 10);\n const maxValue = (maxvalue > MAX_RATING ? MAX_RATING : maxvalue) || DEFAULT_RATING;\n\n /**\n * 1. If datasetItems.length is more than maxValue (i.e. 10 ratings) then just extract maxValue of items from datasetItems.\n * 2. If datasetItems are not available then prepare ratings value depending on maxvalue. eg: 1,2,3 .. upto maxvalue\n * 3. If maxvalue / i value is more than datasetItems length, prepare default rating items for i values more than datasetItems.length\n */\n if (data.length && data.length > maxValue) {\n data = slice(data, 0, maxValue);\n }\n\n for (let i = maxValue; i > 0; i--) {\n if (!data.length) {\n ratingItems.push({key: i, value: i, index: i, label: i});\n } else {\n if (i > data.length) {\n ratingItems.push({key: i, value: i, index: i, label: i});\n } else {\n data = getOrderedDataset(data, 'index:desc');\n ratingItems = ratingItems.concat(data);\n break;\n }\n }\n }\n\n this.ratingItems = ratingItems;\n if (!data.length) { // constructs default datasetItems when there is no dataset binding.\n this.datasetItems = ratingItems;\n }\n this.onDatavalueChange(this.datavalue);\n }\n\n onRatingClick($event, rate) {\n this.modelByKey = rate.key;\n this.selectedRatingValue = rate.index;\n\n // support if the caption is binded in the old projects for backward compatibility\n if (!this.showcaptions) {\n this.caption = rate.label;\n }\n\n this.invokeOnTouched();\n // invoke on datavalue change.\n this.invokeOnChange(this.datavalue, $event || {}, true);\n }\n\n // Update the selected flag on datasetItems and assign the ratingValue.\n /**\n * On datavalue change, update the caption, selectedRatingValue.\n * 1. if datasetItems contain the selected item (check the selected flag on item), find the index of selected item.\n * 2. if not, just check if the datavalue is provided as the index on the item.\n *\n * @param dataVal datavalue\n */\n onDatavalueChange(dataVal) {\n if (!isEmpty(this.datasetItems)) {\n let selectedItem = find(this.datasetItems, {'selected': true});\n\n if (!selectedItem && !isUndefined(dataVal)) {\n selectedItem = find(this.datasetItems, function (item) {\n return toString(item.index) === dataVal;\n });\n if (selectedItem) {\n selectedItem.selected = true;\n }\n }\n\n if (!selectedItem) {\n // reset the model if there is no item found.\n this.modelByKey = undefined;\n this.caption = '';\n }\n\n this.selectedRatingValue = selectedItem ? selectedItem.index : 0;\n if (selectedItem) {\n this.caption = selectedItem.label;\n }\n } else {\n this.selectedRatingValue = 0;\n }\n if (this.readonly) {\n // when dataset is not given but datavalue is provided which is integer\n if (!this.selectedRatingValue && !isNaN(dataVal)) {\n this.selectedRatingValue = (parseFloat(dataVal) <= this.maxvalue) ? dataVal : this.maxvalue;\n }\n this.ratingsWidth = this.calculateRatingsWidth(dataVal);\n }\n }\n\n calculateRatingsWidth(dataVal?: any) {\n const selectedRating = parseFloat(this.selectedRatingValue),\n starWidth = 0.925,\n maxValue = parseInt(this.maxvalue || this.datasetItems.length, 10) || DEFAULT_RATING;\n\n dataVal = dataVal || this.datavalue;\n if (dataVal === undefined || dataVal === '' || dataVal === null) {\n this.caption = '';\n return 0;\n }\n if (selectedRating <= maxValue && selectedRating >= 0) {\n return selectedRating * starWidth + 'em';\n }\n if (selectedRating > maxValue) {\n return maxValue * starWidth + 'em';\n }\n }\n\n onPropertyChange(key: string, nv: any, ov?: any) {\n if (key === 'readonly') {\n if (nv) {\n this.ratingsWidth = this.calculateRatingsWidth();\n }\n } else if (key === 'maxvalue') {\n /** Storing the datavalue in temp variable and assiging back to datavalue\n * after default datalist is prepared to trigger Dataset Aware class select cycle\n * as the datavalue property change is triggering first rather than maxvalue\n * in the rating widget is used inside a datatable\n */\n let tempDataValue = this.datavalue;\n this.prepareRatingDataset();\n // reset all the items.\n this.resetDatasetItems();\n if (!isUndefined(tempDataValue)) {\n this.datavalue = tempDataValue;\n }\n } else {\n super.onPropertyChange(key, nv, ov);\n }\n }\n\n /* Detect touch enabled devices & update hover styles*/\n onTouchStart($event) {\n this.touchEnabled = true;\n this.onTouchStart = noop;\n }\n onMouseleave() {\n this.caption = this.displayValue as string;\n }\n\n onMouseOver($event, rate) {\n this.caption = rate.label;\n !this.touchEnabled && !$event.target.classList.contains('rating-label-hover') && $event.target.classList.add('rating-label-hover');\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\n\nimport { WmComponentsModule } from '@wm/components/base';\n\nimport { RatingComponent } from './rating.component';\n\nconst components = [\n RatingComponent\n];\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n WmComponentsModule\n ],\n declarations: [...components],\n exports: [...components]\n})\nexport class RatingModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAGO,MAAM,WAAW,GAAG,IAAI,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IAAA,EAAA,CAAA;AACN,gBAAA,OAAO,EAAE;oBACL,YAAY;oBACZ,WAAW;oBACX,kBAAkB;AACrB,iBAAA;AACD,gBAAA,YAAY,EAAE,CAAC,GAAG,UAAU,CAAC;AAC7B,gBAAA,OAAO,EAAE,CAAC,GAAG,UAAU,CAAC;AAC3B,aAAA,CAAA;;wFACY,YAAY,EAAA,EAAA,YAAA,EAAA,CAZrB,eAAe,CAAA,EAAA,OAAA,EAAA,CAKX,YAAY;QACZ,WAAW;AACX,QAAA,kBAAkB,aAPtB,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA,GAAA;;ACTnB;;AAEG;;;;"}
|
@@ -8,12 +8,14 @@ export declare class RatingComponent extends DatasetAwareFormComponent {
|
|
8
8
|
maxvalue: any;
|
9
9
|
private _selectedRatingValue;
|
10
10
|
ratingsWidth: any;
|
11
|
-
|
11
|
+
ratingItems: any;
|
12
12
|
private _id;
|
13
13
|
iconsize: string;
|
14
14
|
iconcolor: string;
|
15
15
|
onFocus: any;
|
16
16
|
private touchEnabled;
|
17
|
+
activeiconclass: string;
|
18
|
+
inactiveiconclass: string;
|
17
19
|
ratingEl: ElementRef;
|
18
20
|
get selectedRatingValue(): any;
|
19
21
|
set selectedRatingValue(val: any);
|
app-ng-runtime/package.json
CHANGED
File without changes
|
@@ -1,38 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Use App.getDependency for Dependency Injection
|
3
|
-
* eg: var DialogService = App.getDependency('DialogService');
|
4
|
-
*/
|
5
|
-
/* perform any action on widgets/variables within this block */
|
6
|
-
Widget.onReady = function () {
|
7
|
-
/*
|
8
|
-
* variables can be accessed through 'Widget.Variables' property here
|
9
|
-
* e.g. to get dataSet in a staticVariable named 'loggedInUser' use following script
|
10
|
-
* Widget.Variables.loggedInUser.getData()
|
11
|
-
*
|
12
|
-
* widgets can be accessed through 'Widget.Widgets' property here
|
13
|
-
* e.g. to get value of text widget named 'username' use following script
|
14
|
-
* 'Widget.Widgets.username.datavalue'
|
15
|
-
*/
|
16
|
-
if (Widget.props.show_intermediate.toString().toLowerCase() === 'true') {
|
17
|
-
Widget.Widgets.checkboxset.class += ' intermediate-checkbox';
|
18
|
-
}
|
19
|
-
if (Widget.props.layout === "horizontal") {
|
20
|
-
Widget.Widgets.checkboxset.class += ' horizontal';
|
21
|
-
}
|
22
|
-
else {
|
23
|
-
Widget.Widgets.checkboxset.class += ' vertical';
|
24
|
-
}
|
25
|
-
if (Widget.props.label_placement === "top") {
|
26
|
-
Widget.Widgets.checkboxset.class += ' top-placement';
|
27
|
-
}
|
28
|
-
else if (Widget.props.label_placement === "bottom") {
|
29
|
-
Widget.Widgets.checkboxset.class += ' bottom-placement';
|
30
|
-
}
|
31
|
-
else if (Widget.props.label_placement === "start") {
|
32
|
-
Widget.Widgets.checkboxset.class += ' start-placement';
|
33
|
-
}
|
34
|
-
else {
|
35
|
-
Widget.Widgets.checkboxset.class += '';
|
36
|
-
}
|
37
|
-
Widget.Widgets.composite.required = Widget.props.required;
|
38
|
-
};
|
@@ -1,7 +0,0 @@
|
|
1
|
-
export var checkbox_set = {
|
2
|
-
markup: "%3Cwm-custom-widget-container%3E%0A++++%3Cwm-composite+name%3D%22composite%22%3E%0A++++++++%3Cwm-label+class%3D%22+control-label%22+notag%3D%22true%22+name%3D%22label1%22+caption%3D%22bind%3Aprops.label_text%22%3E%3C%2Fwm-label%3E%0A++++++++%3Cwm-container+name%3D%22container1%22%3E%0A++++++++++++%3Cwm-checkboxset+height%3D%22auto%22+name%3D%22checkboxset%22+dataset%3D%22bind%3Aprops.data_set%22+datafield%3D%22All+Fields%22+disabled%3D%22bind%3Aprops.state+%3D%3D+%26quot%3BDisabled%26quot%3B%22+required%3D%22bind%3Aprops.required%22+datavalue%3D%22bind%3Aprops.default_value%22%3E%3C%2Fwm-checkboxset%3E%0A++++++++%3C%2Fwm-container%3E%0A++++%3C%2Fwm-composite%3E%0A%3C%2Fwm-custom-widget-container%3E",
|
3
|
-
script: "%2F*%0A+*+Use+App.getDependency+for+Dependency+Injection%0A+*+eg%3A+var+DialogService+%3D+App.getDependency%28%27DialogService%27%29%3B%0A+*%2F%0A%0A%2F*+perform+any+action+on+widgets%2Fvariables+within+this+block+*%2F%0AWidget.onReady+%3D+function%28%29+%7B%0A++++%2F*%0A+++++*+variables+can+be+accessed+through+%27Widget.Variables%27+property+here%0A+++++*+e.g.+to+get+dataSet+in+a+staticVariable+named+%27loggedInUser%27+use+following+script%0A+++++*+Widget.Variables.loggedInUser.getData%28%29%0A+++++*%0A+++++*+widgets+can+be+accessed+through+%27Widget.Widgets%27+property+here%0A+++++*+e.g.+to+get+value+of+text+widget+named+%27username%27+use+following+script%0A+++++*+%27Widget.Widgets.username.datavalue%27%0A+++++*%2F%0A++++if+%28Widget.props.show_intermediate.toString%28%29.toLowerCase%28%29+%3D%3D%3D+%27true%27%29+%7B%0A++++++++Widget.Widgets.checkboxset.class+%2B%3D+%27+intermediate-checkbox%27%3B%0A++++%7D%0A%0A++++if+%28Widget.props.layout+%3D%3D%3D+%22horizontal%22%29+%7B%0A++++++++Widget.Widgets.checkboxset.class+%2B%3D+%27+horizontal%27%3B%0A++++%7D+else+%7B%0A++++++++Widget.Widgets.checkboxset.class+%2B%3D+%27+vertical%27%3B%0A++++%7D%0A++++if+%28Widget.props.label_placement+%3D%3D%3D+%22top%22%29+%7B%0A++++++++Widget.Widgets.checkboxset.class+%2B%3D+%27+top-placement%27%3B%0A++++%7D+else+if+%28Widget.props.label_placement+%3D%3D%3D+%22bottom%22%29+%7B%0A++++++++Widget.Widgets.checkboxset.class+%2B%3D+%27+bottom-placement%27%3B%0A++++%7D+else+if+%28Widget.props.label_placement+%3D%3D%3D+%22start%22%29+%7B%0A++++++++Widget.Widgets.checkboxset.class+%2B%3D+%27+start-placement%27%3B%0A++++%7D+else+%7B%0A++++++++Widget.Widgets.checkboxset.class+%2B%3D+%27%27%3B%0A++++%7D%0A++++Widget.Widgets.composite.required+%3D+Widget.props.required%3B%0A%0A%7D%3B",
|
4
|
-
styles: ".app-checkboxset.vertical+%7B%0A++++flex-direction%3A+column%3B%0A%7D%0A%0A.app-checkboxset.intermediate-checkbox+.app-checkboxset-label%3E.caption%3A%3Aafter+%7B%0A++++top%3A+calc%28100%25+-+25px%29%3B%0A++++height%3A+0px%3B%0A++++transform%3A+translate%283px%2C+4px%29+rotate%280deg%29+%21important%3B%0A%7D%0A%0A%0A%2F*+start+label+placement+styles++*%2F%0A%0A.app-checkboxset.horizontal.start-placement+.app-checkboxset-label%3E.caption%2C%0A.app-checkboxset.vertical.start-placement+.app-checkboxset-label%3E.caption+%7B%0A++++padding-left%3A+unset%3B%0A++++padding-right%3A+32px%3B%0A%7D%0A%0A.app-checkboxset.horizontal.start-placement+.checkbox%3Elabel+.caption%3Abefore%2C%0A.app-checkboxset.vertical.start-placement+.checkbox%3Elabel+.caption%3Abefore+%7B%0A++++left%3A+unset%3B%0A++++right%3A+1px%3B%0A%7D%0A%0A.app-checkboxset.horizontal.start-placement+.checkbox%3Elabel+.caption%3Aafter%2C%0A.app-checkboxset.vertical.start-placement+.checkbox%3Elabel+.caption%3Aafter+%7B%0A++++left%3A+unset%3B%0A++++right%3A+7px%3B%0A%7D%0A%0A.app-checkboxset.horizontal.start-placement+.app-checkbox.checkbox%3Elabel%3Einput%5Btype%3D%22checkbox%22%5D%2C%0A.app-checkboxset.vertical.start-placement+.app-checkbox.checkbox%3Elabel%3Einput%5Btype%3D%22checkbox%22%5D+%7B%0A++++left%3A+unset%3B%0A++++right%3A+-10px%3B%0A%7D%0A%0A%0A%2F*+top+label+placement+styles++*%2F%0A%0A.app-checkboxset.horizontal.top-placement+.app-checkboxset-label%3E.caption+%7B%0A++++padding-left%3A+unset%3B%0A++++padding-bottom%3A+32px%3B%0A++++min-width%3A+20px%3B%0A++++justify-content%3A+center%3B%0A++++display%3A+inline-flex%3B%0A++++margin-top%3A+unset%3B%0A%7D%0A%0A.app-checkboxset.horizontal.top-placement+.app-checkbox.checkbox%3Elabel%3Einput%5Btype%3D%22checkbox%22%5D%3Achecked%2B.caption%3Aafter+%7B%0A++++left%3A+50%25%3B%0A++++transform%3A+translate%28-6px%2C+4px%29+rotate%28-45deg%29+scale%281%29%3B%0A++++top%3A+32px%3B%0A%7D%0A%0A.app-checkboxset.horizontal.top-placement+.app-checkboxset-label%3E.caption%3A%3Abefore+%7B%0A++++left%3A+50%25%3B%0A++++top%3A+32px%3B%0A++++transform%3A+translateX%28-50%25%29%3B%0A%7D%0A%0A.app-checkboxset.horizontal.top-placement+.app-checkbox.checkbox%3Elabel%3Einput%5Btype%3D%22checkbox%22%5D+%7B%0A++++left%3A+50%25%3B%0A++++top%3A+21px%3B%0A++++transform%3A+translateX%28-50%25%29%3B%0A%7D%0A%0A.app-checkboxset.vertical.top-placement+.app-checkboxset-label%3E.caption+%7B%0A++++padding-left%3A+unset%3B%0A++++padding-bottom%3A+unset%3B%0A++++padding-top%3A+32px%3B%0A%7D%0A%0A.app-checkboxset.vertical.top-placement+%7B%0A++++display%3A+flex%3B%0A++++min-width%3A+40px%3B%0A++++max-width%3A+max-content%3B%0A++++align-items%3A+center%3B%0A%7D%0A%0A.app-checkboxset.vertical.top-placement+.app-checkboxset-label%3E.caption%3A%3Abefore+%7B%0A++++left%3A+50%25%3B%0A++++transform%3A+translateX%28-50%25%29%3B%0A%7D%0A%0A.app-checkboxset.vertical.top-placement+.app-checkbox.checkbox%3Elabel%3Einput%5Btype%3D%22checkbox%22%5D+%7B%0A++++left%3A+50%25%3B%0A++++transform%3A+translateX%28-50%25%29%3B%0A%7D%0A%0A.wm-app+.app-checkboxset.vertical.top-placement%3E.app-checkbox.checkbox%3Elabel%3Einput%5Btype%3D%22checkbox%22%5D%3Achecked%2B.caption%3Aafter+%7B%0A++++left%3A+50%25%3B%0A++++transform%3A+translate%28-6px%2C+4px%29+rotate%28-45deg%29+scale%281%29%3B%0A%7D%0A%0A%0A%2F*+bottom+label+placement+style++*%2F%0A%0A.app-checkboxset.horizontal.bottom-placement+.app-checkboxset-label%3E.caption+%7B%0A++++padding-left%3A+unset%3B%0A++++padding-top%3A+32px%3B%0A++++min-width%3A+20px%3B%0A++++justify-content%3A+center%3B%0A++++display%3A+inline-flex%3B%0A++++margin-top%3A+unset%3B%0A%7D%0A%0A.app-checkboxset.horizontal.bottom-placement+.app-checkbox.checkbox%3Elabel%3Einput%5Btype%3D%22checkbox%22%5D%3Achecked%2B.caption%3Aafter+%7B%0A++++left%3A+50%25%3B%0A++++transform%3A+translate%28-6px%2C+4px%29+rotate%28-45deg%29+scale%281%29%3B%0A++++top%3A+8px%3B%0A%7D%0A%0A.app-checkboxset.horizontal.bottom-placement+.app-checkboxset-label%3E.caption%3A%3Abefore+%7B%0A++++left%3A+50%25%3B%0A++++top%3A+8px%3B%0A++++transform%3A+translateX%28-50%25%29%3B%0A%7D%0A%0A.app-checkboxset.horizontal.bottom-placement+.app-checkbox.checkbox%3Elabel%3Einput%5Btype%3D%22checkbox%22%5D+%7B%0A++++left%3A+50%25%3B%0A++++top%3A+-2px%3B%0A++++transform%3A+translateX%28-50%25%29%3B%0A%7D%0A%0A.app-checkboxset.vertical.bottom-placement+.app-checkboxset-label%3E.caption+%7B%0A++++padding-left%3A+unset%3B%0A++++padding-bottom%3A+unset%3B%0A++++padding-top%3A+32px%3B%0A%7D%0A%0A.app-checkboxset.vertical.bottom-placement+%7B%0A++++display%3A+flex%3B%0A++++min-width%3A+40px%3B%0A++++max-width%3A+max-content%3B%0A++++align-items%3A+center%3B%0A%7D%0A%0A.app-checkboxset.vertical.bottom-placement+.app-checkboxset-label%3E.caption%3A%3Abefore+%7B%0A++++left%3A+50%25%3B%0A++++transform%3A+translateX%28-50%25%29%3B%0A%7D%0A%0A.app-checkboxset.vertical.bottom-placement+.app-checkbox.checkbox%3Elabel%3Einput%5Btype%3D%22checkbox%22%5D+%7B%0A++++left%3A+50%25%3B%0A++++transform%3A+translateX%28-50%25%29%3B%0A%7D%0A%0A.wm-app+.app-checkboxset.vertical.bottom-placement%3E.app-checkbox.checkbox%3Elabel%3Einput%5Btype%3D%22checkbox%22%5D%3Achecked%2B.caption%3Aafter+%7B%0A++++left%3A+50%25%3B%0A++++transform%3A+translate%28-6px%2C+4px%29+rotate%28-45deg%29+scale%281%29%3B%0A%7D%0A%0A.app-checkboxset.horizontal+.app-checkboxset-label.disabled%3Einput%5Btype%3D%22checkbox%22%5D%3Achecked%2B.caption%3A%3Abefore%2C%0A.app-checkboxset.horizontal.intermediate-checkbox+.app-checkboxset-label.disabled%3Einput%5Btype%3D%22checkbox%22%5D%2B.caption%3A%3Abefore%2C%0A.app-checkboxset.vertical+.app-checkboxset-label.disabled%3Einput%5Btype%3D%22checkbox%22%5D%3Achecked%2B.caption%3A%3Abefore%2C%0A.app-checkboxset.vertical.intermediate-checkbox+.app-checkboxset-label.disabled%3Einput%5Btype%3D%22checkbox%22%5D%2B.caption%3A%3Abefore+%7B%0A++++border-color%3A+var%28--wm-checkbox-border-color%29%3B%0A++++background-color%3A+var%28--wm-checkbox-border-color%29%3B%0A%7D",
|
5
|
-
variables: "%7B+%7D",
|
6
|
-
config: "%7B%0A%20%20%22widgetType%22%20%3A%20%22wm-custom-widget%22%2C%0A%20%20%22properties%22%20%3A%20%7B%0A%20%20%20%20%22layout%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22list%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Layout%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Defines%20the%20orientation%20of%20the%20element.%20%27horizontal%27%20indicates%20that%20the%20element%27s%20layout%20or%20behavior%20is%20aligned%20along%20the%20horizontal%20axis%20(left%20to%20right)%2C%20while%20%27vertical%27%20means%20the%20element%20is%20aligned%20along%20the%20vertical%20axis%20(top%20to%20bottom)%22%2C%0A%20%20%20%20%20%20%22options%22%20%3A%20%5B%20%22horizontal%22%2C%20%22vertical%22%20%5D%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22horizontal%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22show_intermediate%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22boolean%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Intermediate%20checkbox%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Controls%20whether%20the%20checkbox%20shows%20an%20indeterminate%20state.%20True%20displays%20the%20intermediate%20state%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20false%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22state%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22list%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22State%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20whether%20the%20component%20is%20active%20or%20inactive.%20%27enabled%27%20means%20the%20component%20is%20interactive%20and%20functional%2C%20while%20%27disabled%27%20means%20it%20is%20non-interactive%20and%20inactive%22%2C%0A%20%20%20%20%20%20%22options%22%20%3A%20%5B%20%22Enabled%22%2C%20%22Disabled%22%20%5D%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22Enabled%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22label_placement%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22list%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Label%20placement%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20label%27s%20position%20relative%20to%20the%20component%2C%20with%20options%3A%20%27top%27%20(Label%20appears%20above%20the%20component)%2C%20%27bottom%27%20(Label%20appears%20below%20the%20component)%2C%20%27start%27%20(Label%20appears%20left%20of%20the%20component)%22%2C%0A%20%20%20%20%20%20%22options%22%20%3A%20%5B%20%22top%22%2C%20%22bottom%22%2C%20%22start%22%20%5D%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22top%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22label_text%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Label%20text%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Label%20text%20informs%20users%20about%20what%20information%20is%20requested%20for%20a%20checkboxSet%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22Label%20Text%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22data_set%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Data%20Set%20values%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Defines%20the%20available%20options%20for%20the%20data%20set%2C%20typically%20a%20list%20of%20labels%20such%20as%20%27yes%27%2C%20%27no%27%2C%20%27maybe%27%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22yes%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22default_value%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Default%20Value%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20default%20value%20for%20the%20checked%20attribute.%20Default%20is%20%27yes%27%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22yes%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22required%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22boolean%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Required%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Indicates%20whether%20the%20checkboxSet%20is%20mandatory.%20True%20makes%20it%20required%3B%20false%20means%20it%20is%20optional%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20false%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%20%20%22events%22%20%3A%20%7B%20%7D%0A%7D%0A",
|
7
|
-
};
|
@@ -1,10 +0,0 @@
|
|
1
|
-
declare function handleValueChange(): void;
|
2
|
-
declare function handleStepValueChange(): void;
|
3
|
-
declare function handleRequiredChange(): void;
|
4
|
-
declare function activeSliderElement(): void;
|
5
|
-
declare function activeSliderElement(widgetMap: any): void;
|
6
|
-
declare function configureDiscreteSlider(): void;
|
7
|
-
declare function updateSteps(): void;
|
8
|
-
declare function updateLabelVisibility(): void;
|
9
|
-
declare function getSliderPercentage(value: any): number;
|
10
|
-
declare function getSliderPercentage(value: any): number;
|
@@ -1,171 +0,0 @@
|
|
1
|
-
function handleValueChange() {
|
2
|
-
var initialValue = Number(Widget.props.value); // Use props.value for initial value
|
3
|
-
Widget.Widgets.slider1.$element[0].style.setProperty("--end", (100 - getSliderPercentage(initialValue)) + '%');
|
4
|
-
updateSteps();
|
5
|
-
configureDiscreteSlider();
|
6
|
-
updateLabelVisibility();
|
7
|
-
}
|
8
|
-
function handleStepValueChange() {
|
9
|
-
Widget.Widgets.slider1.step = Widget.props.step_value;
|
10
|
-
updateSteps();
|
11
|
-
configureDiscreteSlider();
|
12
|
-
updateLabelVisibility();
|
13
|
-
}
|
14
|
-
function handleRequiredChange() {
|
15
|
-
Widget.Widgets.composite.required = Widget.props.required;
|
16
|
-
}
|
17
|
-
Widget.onPropertyChange = function (propname, newvalue, oldvalue) {
|
18
|
-
switch (propname) {
|
19
|
-
case 'prop-value':
|
20
|
-
case 'prop-min_value':
|
21
|
-
case 'prop-max_value':
|
22
|
-
handleValueChange();
|
23
|
-
break;
|
24
|
-
case 'prop-step_value':
|
25
|
-
handleStepValueChange();
|
26
|
-
break;
|
27
|
-
case 'prop-required':
|
28
|
-
handleRequiredChange();
|
29
|
-
break;
|
30
|
-
}
|
31
|
-
};
|
32
|
-
Widget.onReady = function () {
|
33
|
-
Widget.Widgets.container1.class += ' filled-slider discrete-slider';
|
34
|
-
handleValueChange();
|
35
|
-
handleRequiredChange();
|
36
|
-
configureDiscreteSlider();
|
37
|
-
handleStepValueChange();
|
38
|
-
updateSteps();
|
39
|
-
activeSliderElement();
|
40
|
-
updateLabelVisibility(); // Update label visibility based on initial value
|
41
|
-
};
|
42
|
-
function activeSliderElement() {
|
43
|
-
var activeSlider = Widget.Widgets.slider1.$element[0]; // Get the slider element
|
44
|
-
if (activeSlider) {
|
45
|
-
// Create a new div element
|
46
|
-
var newDiv = document.createElement('p');
|
47
|
-
newDiv.className = 'active-slider'; // Set a class for styling
|
48
|
-
// Append the new element to slider container
|
49
|
-
activeSlider.appendChild(newDiv);
|
50
|
-
}
|
51
|
-
}
|
52
|
-
/*
|
53
|
-
* Configure the slider for discrete steps.
|
54
|
-
*/
|
55
|
-
function configureDiscreteSlider() {
|
56
|
-
var slider = Widget.Widgets.slider1; // Slider widget
|
57
|
-
var minValue = parseInt(Widget.props.min_value, 10);
|
58
|
-
var maxValue = parseInt(Widget.props.max_value, 10);
|
59
|
-
var stepValueParam = Widget.props.step_value;
|
60
|
-
var initialValue = Number(Widget.props.value); // Use props.value for initial value
|
61
|
-
var stepValue = parseInt(stepValueParam, 10);
|
62
|
-
if (isNaN(minValue) || isNaN(maxValue) || isNaN(stepValue) || stepValue <= 0) {
|
63
|
-
console.error("Invalid min, max, or step values");
|
64
|
-
return;
|
65
|
-
}
|
66
|
-
// Set slider's min, max, and step attributes
|
67
|
-
slider.min = minValue;
|
68
|
-
slider.max = maxValue;
|
69
|
-
slider.step = stepValue;
|
70
|
-
// Ensure slider value is within the range
|
71
|
-
if (isNaN(initialValue) || initialValue < minValue || initialValue > maxValue) {
|
72
|
-
console.error("Slider value is out of range");
|
73
|
-
slider.datavalue = minValue; // Default to minValue if the provided value is invalid
|
74
|
-
}
|
75
|
-
else {
|
76
|
-
slider.datavalue = initialValue; // Set the slider to the provided value
|
77
|
-
}
|
78
|
-
// Set initial position
|
79
|
-
Widget.Widgets.slider1.$element[0].style.setProperty("--end", (100 - getSliderPercentage(slider.datavalue)) + '%');
|
80
|
-
}
|
81
|
-
/*
|
82
|
-
* Update the labels displayed on the slider.
|
83
|
-
*/
|
84
|
-
function updateSteps() {
|
85
|
-
var slider = Widget.Widgets.slider1;
|
86
|
-
var labelContainer = Widget.Widgets.container2;
|
87
|
-
if (slider && labelContainer) {
|
88
|
-
var minValue = parseInt(slider.min, 10);
|
89
|
-
var maxValue = parseInt(slider.max, 10);
|
90
|
-
var stepValue = parseInt(slider.step, 10);
|
91
|
-
// Calculate the number of steps
|
92
|
-
var numSteps = Math.ceil((maxValue - minValue) / stepValue);
|
93
|
-
// Clear existing labels
|
94
|
-
labelContainer.$element[0].innerHTML = '';
|
95
|
-
// Create and position labels for each step
|
96
|
-
for (var i = 0; i <= numSteps; i++) {
|
97
|
-
var stepLabel = document.createElement('p');
|
98
|
-
stepLabel.className = 'step-label';
|
99
|
-
var labelValue = minValue + (i * stepValue);
|
100
|
-
// Ensure labelValue does not exceed maxValue
|
101
|
-
if (labelValue > maxValue)
|
102
|
-
break;
|
103
|
-
stepLabel.textContent = labelValue;
|
104
|
-
// Calculate and set label position
|
105
|
-
var leftPosition = Math.round(((labelValue - minValue) / (maxValue - minValue)) * 100 * 100) / 100; // Rounded to two decimal places
|
106
|
-
var adjustedPosition = leftPosition - 1;
|
107
|
-
stepLabel.style.setProperty('--position', "".concat(adjustedPosition, "%"));
|
108
|
-
stepLabel.setAttribute('data-position', adjustedPosition);
|
109
|
-
// Append label to the container
|
110
|
-
labelContainer.$element[0].appendChild(stepLabel);
|
111
|
-
}
|
112
|
-
// Set container positioning and add event listener for updating label visibility
|
113
|
-
labelContainer.$element[0].style.position = 'relative';
|
114
|
-
Widget.Widgets.slider1.$element[0].addEventListener('input', updateLabelVisibility);
|
115
|
-
// Initial update of label visibility
|
116
|
-
updateLabelVisibility();
|
117
|
-
}
|
118
|
-
}
|
119
|
-
function updateLabelVisibility() {
|
120
|
-
var slider = Widget.Widgets.slider1;
|
121
|
-
var labels = Widget.Widgets.container2.$element[0].getElementsByClassName('step-label');
|
122
|
-
if (slider) {
|
123
|
-
var sliderValue = Number(slider.datavalue); // Get the current slider value
|
124
|
-
var minValue_1 = parseInt(slider.min, 10);
|
125
|
-
var maxValue_1 = parseInt(slider.max, 10);
|
126
|
-
var stepValue_1 = parseInt(slider.step, 10);
|
127
|
-
// Calculate the number of steps
|
128
|
-
var targets = Array.from({
|
129
|
-
length: Math.ceil((maxValue_1 - minValue_1) / stepValue_1) + 1
|
130
|
-
}, function (_, i) { return minValue_1 + i * stepValue_1; }).filter(function (value) { return value <= maxValue_1; });
|
131
|
-
// Update label states based on slider value and targets
|
132
|
-
for (var _i = 0, labels_1 = labels; _i < labels_1.length; _i++) {
|
133
|
-
var label = labels_1[_i];
|
134
|
-
var labelValue = parseInt(label.textContent, 10);
|
135
|
-
// Remove existing classes
|
136
|
-
label.classList.remove('hidden', 'inactive', 'active');
|
137
|
-
// Determine the label's state based on the slider value
|
138
|
-
if (targets.includes(labelValue)) {
|
139
|
-
if (labelValue === sliderValue) {
|
140
|
-
label.classList.add('hidden'); // Hide label if it matches the slider value
|
141
|
-
}
|
142
|
-
else if (labelValue < sliderValue) {
|
143
|
-
label.classList.add('inactive'); // Label is inactive if it is less than the slider value
|
144
|
-
}
|
145
|
-
else {
|
146
|
-
label.classList.add('active'); // Label is active if it is greater than the slider value
|
147
|
-
}
|
148
|
-
}
|
149
|
-
// Ensure that labels are visible based on their state
|
150
|
-
label.style.display = 'block';
|
151
|
-
}
|
152
|
-
}
|
153
|
-
}
|
154
|
-
/*
|
155
|
-
* Convert slider value to percentage based on min and max
|
156
|
-
*/
|
157
|
-
function getSliderPercentage(value) {
|
158
|
-
var slider = Widget.Widgets.slider1;
|
159
|
-
var minValue = parseInt(slider.min, 10);
|
160
|
-
var maxValue = parseInt(slider.max, 10);
|
161
|
-
return ((value - minValue) / (maxValue - minValue)) * 100;
|
162
|
-
}
|
163
|
-
/*
|
164
|
-
* Handle slider value changes.
|
165
|
-
*/
|
166
|
-
Widget.slider1Change = function ($event, widget, newVal, oldVal) {
|
167
|
-
var sliderValue = newVal; // Use the new slider value
|
168
|
-
widget.$element[0].style.setProperty("--end", (100 - getSliderPercentage(sliderValue)) + '%');
|
169
|
-
// Update label visibility on slider change
|
170
|
-
updateLabelVisibility();
|
171
|
-
};
|
@@ -1,7 +0,0 @@
|
|
1
|
-
export var discrete_slider = {
|
2
|
-
"markup": "%3Cwm-custom-widget-container%3E%0A++++%3Cwm-composite+name%3D%22composite%22+class%3D%22slider-composite%22%3E%0A++++++++%3Cwm-label+class%3D%22control-label%22+notag%3D%22true%22+name%3D%22label1%22+caption%3D%22bind%3Aprops.label_text%22%3E%3C%2Fwm-label%3E%0A++++++++%3Cwm-container+name%3D%22container1%22+class%3D%22filled-slider%22%3E%0A++++++++++++%3Cwm-slider+name%3D%22slider1%22+class%3D%22cst-slider%22+datavalue%3D%22bind%3Aprops.value%22+on-change%3D%22slider1Change%28%24event%2C+widget%2C+newVal%2C+oldVal%29%22+disabled%3D%22bind%3Aprops.state%3D%3D%26quot%3BDisabled%26quot%3B%22+minvalue%3D%22bind%3Aprops.min_value%22+maxvalue%3D%22bind%3Aprops.max_value%22%3E%3C%2Fwm-slider%3E%0A++++++++%3C%2Fwm-container%3E%0A++++++++%3Cwm-container+name%3D%22container2%22+class%3D%22stop-indicator%22%3E%3C%2Fwm-container%3E%0A++++%3C%2Fwm-composite%3E%0A%3C%2Fwm-custom-widget-container%3E",
|
3
|
-
"script": "function+handleValueChange%28%29+%7B%0A++++const+initialValue+%3D+Number%28Widget.props.value%29%3B+%2F%2F+Use+props.value+for+initial+value%0A++++Widget.Widgets.slider1.%24element%5B0%5D.style.setProperty%28%22--end%22%2C+%28100+-+getSliderPercentage%28initialValue%29%29+%2B+%27%25%27%29%3B%0A++++updateSteps%28%29%3B%0A++++configureDiscreteSlider%28%29%3B%0A++++updateLabelVisibility%28%29%3B%0A%7D%0A%0Afunction+handleStepValueChange%28%29+%7B%0A++++Widget.Widgets.slider1.step+%3D+Widget.props.step_value%3B%0A++++updateSteps%28%29%3B%0A++++configureDiscreteSlider%28%29%3B%0A++++updateLabelVisibility%28%29%3B%0A%7D%0A%0Afunction+handleRequiredChange%28%29+%7B%0A++++Widget.Widgets.composite.required+%3D+Widget.props.required%3B%0A%0A%7D%0A%0AWidget.onPropertyChange+%3D+function%28propname%2C+newvalue%2C+oldvalue%29+%7B%0A++++switch+%28propname%29+%7B%0A++++++++case+%27prop-value%27%3A%0A++++++++case+%27prop-min_value%27%3A%0A++++++++case+%27prop-max_value%27%3A%0A++++++++++++handleValueChange%28%29%3B%0A++++++++++++break%3B%0A++++++++case+%27prop-step_value%27%3A%0A++++++++++++handleStepValueChange%28%29%3B%0A++++++++++++break%3B%0A++++++++case+%27prop-required%27%3A%0A++++++++++++handleRequiredChange%28%29%3B%0A++++++++++++break%3B%0A++++%7D%0A%7D%0A%0A%0AWidget.onReady+%3D+function%28%29+%7B%0A++++Widget.Widgets.container1.class+%2B%3D+%27+filled-slider+discrete-slider%27%3B%0A++++handleValueChange%28%29%0A++++handleRequiredChange%28%29%0A++++configureDiscreteSlider%28%29%3B%0A++++handleStepValueChange%28%29%3B%0A++++updateSteps%28%29%3B%0A++++activeSliderElement%28%29%3B%0A++++updateLabelVisibility%28%29%3B+%2F%2F+Update+label+visibility+based+on+initial+value%0A%7D%3B%0A%0A%0A%0Afunction+activeSliderElement%28%29+%7B%0A++++const+activeSlider+%3D+Widget.Widgets.slider1.%24element%5B0%5D%3B+%2F%2F+Get+the+slider+element%0A%0A++++if+%28activeSlider%29+%7B%0A++++++++%2F%2F+Create+a+new+div+element%0A++++++++const+newDiv+%3D+document.createElement%28%27p%27%29%3B%0A++++++++newDiv.className+%3D+%27active-slider%27%3B+%2F%2F+Set+a+class+for+styling%0A++++++++%2F%2F+Append+the+new+element+to+slider+container%0A++++++++activeSlider.appendChild%28newDiv%29%3B%0A++++%7D%0A%7D%0A%0A%2F*+%0A+*+Configure+the+slider+for+discrete+steps.%0A+*%2F%0Afunction+configureDiscreteSlider%28%29+%7B%0A++++const+slider+%3D+Widget.Widgets.slider1%3B+%2F%2F+Slider+widget%0A++++const+minValue+%3D+parseInt%28Widget.props.min_value%2C+10%29%3B%0A++++const+maxValue+%3D+parseInt%28Widget.props.max_value%2C+10%29%3B%0A++++const+stepValueParam+%3D+Widget.props.step_value%3B%0A++++const+initialValue+%3D+Number%28Widget.props.value%29%3B+%2F%2F+Use+props.value+for+initial+value%0A%0A++++const+stepValue+%3D+parseInt%28stepValueParam%2C+10%29%3B%0A++++if+%28isNaN%28minValue%29+%7C%7C+isNaN%28maxValue%29+%7C%7C+isNaN%28stepValue%29+%7C%7C+stepValue+%3C%3D+0%29+%7B%0A++++++++console.error%28%22Invalid+min%2C+max%2C+or+step+values%22%29%3B%0A++++++++return%3B%0A++++%7D%0A%0A++++%2F%2F+Set+slider%27s+min%2C+max%2C+and+step+attributes%0A++++slider.min+%3D+minValue%3B%0A++++slider.max+%3D+maxValue%3B%0A++++slider.step+%3D+stepValue%3B%0A%0A++++%2F%2F+Ensure+slider+value+is+within+the+range%0A++++if+%28isNaN%28initialValue%29+%7C%7C+initialValue+%3C+minValue+%7C%7C+initialValue+%3E+maxValue%29+%7B%0A++++++++console.error%28%22Slider+value+is+out+of+range%22%29%3B%0A++++++++slider.datavalue+%3D+minValue%3B+%2F%2F+Default+to+minValue+if+the+provided+value+is+invalid%0A++++%7D+else+%7B%0A++++++++slider.datavalue+%3D+initialValue%3B+%2F%2F+Set+the+slider+to+the+provided+value%0A++++%7D%0A%0A++++%2F%2F+Set+initial+position%0A++++Widget.Widgets.slider1.%24element%5B0%5D.style.setProperty%28%22--end%22%2C+%28100+-+getSliderPercentage%28slider.datavalue%29%29+%2B+%27%25%27%29%3B%0A%7D%0A%0A%2F*%0A+*+Update+the+labels+displayed+on+the+slider.%0A+*%2F%0Afunction+updateSteps%28%29+%7B%0A++++const+slider+%3D+Widget.Widgets.slider1%3B%0A++++const+labelContainer+%3D+Widget.Widgets.container2%3B%0A%0A++++if+%28slider+%26%26+labelContainer%29+%7B%0A++++++++const+minValue+%3D+parseInt%28slider.min%2C+10%29%3B%0A++++++++const+maxValue+%3D+parseInt%28slider.max%2C+10%29%3B%0A++++++++const+stepValue+%3D+parseInt%28slider.step%2C+10%29%3B%0A%0A++++++++%2F%2F+Calculate+the+number+of+steps%0A++++++++const+numSteps+%3D+Math.ceil%28%28maxValue+-+minValue%29+%2F+stepValue%29%3B%0A%0A++++++++%2F%2F+Clear+existing+labels%0A++++++++labelContainer.%24element%5B0%5D.innerHTML+%3D+%27%27%3B%0A%0A++++++++%2F%2F+Create+and+position+labels+for+each+step%0A++++++++for+%28let+i+%3D+0%3B+i+%3C%3D+numSteps%3B+i%2B%2B%29+%7B%0A++++++++++++const+stepLabel+%3D+document.createElement%28%27p%27%29%3B%0A++++++++++++stepLabel.className+%3D+%27step-label%27%3B%0A++++++++++++const+labelValue+%3D+minValue+%2B+%28i+*+stepValue%29%3B%0A%0A++++++++++++%2F%2F+Ensure+labelValue+does+not+exceed+maxValue%0A++++++++++++if+%28labelValue+%3E+maxValue%29+break%3B%0A%0A++++++++++++stepLabel.textContent+%3D+labelValue%3B%0A%0A++++++++++++%2F%2F+Calculate+and+set+label+position%0A++++++++++++const+leftPosition+%3D+Math.round%28%28%28labelValue+-+minValue%29+%2F+%28maxValue+-+minValue%29%29+*+100+*+100%29+%2F+100%3B+%2F%2F+Rounded+to+two+decimal+places%0A++++++++++++const+adjustedPosition+%3D+leftPosition+-+1%3B%0A++++++++++++stepLabel.style.setProperty%28%27--position%27%2C+%60%24%7BadjustedPosition%7D%25%60%29%3B%0A%0A++++++++++++stepLabel.setAttribute%28%27data-position%27%2C+adjustedPosition%29%3B%0A%0A++++++++++++%2F%2F+Append+label+to+the+container%0A++++++++++++labelContainer.%24element%5B0%5D.appendChild%28stepLabel%29%3B%0A++++++++%7D%0A%0A++++++++%2F%2F+Set+container+positioning+and+add+event+listener+for+updating+label+visibility%0A++++++++labelContainer.%24element%5B0%5D.style.position+%3D+%27relative%27%3B%0A++++++++Widget.Widgets.slider1.%24element%5B0%5D.addEventListener%28%27input%27%2C+updateLabelVisibility%29%3B%0A%0A++++++++%2F%2F+Initial+update+of+label+visibility%0A++++++++updateLabelVisibility%28%29%3B%0A++++%7D%0A%7D%0A%0Afunction+updateLabelVisibility%28%29+%7B%0A++++const+slider+%3D+Widget.Widgets.slider1%3B%0A++++const+labels+%3D+Widget.Widgets.container2.%24element%5B0%5D.getElementsByClassName%28%27step-label%27%29%3B%0A%0A++++if+%28slider%29+%7B%0A++++++++const+sliderValue+%3D+Number%28slider.datavalue%29%3B+%2F%2F+Get+the+current+slider+value%0A++++++++const+minValue+%3D+parseInt%28slider.min%2C+10%29%3B%0A++++++++const+maxValue+%3D+parseInt%28slider.max%2C+10%29%3B%0A++++++++const+stepValue+%3D+parseInt%28slider.step%2C+10%29%3B%0A%0A++++++++%2F%2F+Calculate+the+number+of+steps%0A++++++++const+targets+%3D+Array.from%28%7B%0A++++++++++++length%3A+Math.ceil%28%28maxValue+-+minValue%29+%2F+stepValue%29+%2B+1%0A++++++++%7D%2C+%28_%2C+i%29+%3D%3E+minValue+%2B+i+*+stepValue%29.filter%28value+%3D%3E+value+%3C%3D+maxValue%29%3B%0A++++++++%2F%2F+Update+label+states+based+on+slider+value+and+targets%0A++++++++for+%28const+label+of+labels%29+%7B%0A++++++++++++const+labelValue+%3D+parseInt%28label.textContent%2C+10%29%3B%0A%0A++++++++++++%2F%2F+Remove+existing+classes%0A++++++++++++label.classList.remove%28%27hidden%27%2C+%27inactive%27%2C+%27active%27%29%3B%0A%0A++++++++++++%2F%2F+Determine+the+label%27s+state+based+on+the+slider+value%0A++++++++++++if+%28targets.includes%28labelValue%29%29+%7B%0A++++++++++++++++if+%28labelValue+%3D%3D%3D+sliderValue%29+%7B%0A++++++++++++++++++++label.classList.add%28%27hidden%27%29%3B+%2F%2F+Hide+label+if+it+matches+the+slider+value%0A++++++++++++++++%7D+else+if+%28labelValue+%3C+sliderValue%29+%7B%0A++++++++++++++++++++label.classList.add%28%27inactive%27%29%3B+%2F%2F+Label+is+inactive+if+it+is+less+than+the+slider+value%0A++++++++++++++++%7D+else+%7B%0A++++++++++++++++++++label.classList.add%28%27active%27%29%3B+%2F%2F+Label+is+active+if+it+is+greater+than+the+slider+value%0A++++++++++++++++%7D%0A++++++++++++%7D%0A%0A++++++++++++%2F%2F+Ensure+that+labels+are+visible+based+on+their+state%0A++++++++++++label.style.display+%3D+%27block%27%3B%0A++++++++%7D%0A++++%7D%0A%7D%0A%0A%2F*%0A+*+Convert+slider+value+to+percentage+based+on+min+and+max%0A+*%2F%0Afunction+getSliderPercentage%28value%29+%7B%0A++++const+slider+%3D+Widget.Widgets.slider1%3B%0A++++const+minValue+%3D+parseInt%28slider.min%2C+10%29%3B%0A++++const+maxValue+%3D+parseInt%28slider.max%2C+10%29%3B%0A++++return+%28%28value+-+minValue%29+%2F+%28maxValue+-+minValue%29%29+*+100%3B%0A%7D%0A%0A%2F*%0A+*+Handle+slider+value+changes.%0A+*%2F%0AWidget.slider1Change+%3D+function%28%24event%2C+widget%2C+newVal%2C+oldVal%29+%7B%0A++++const+sliderValue+%3D+newVal%3B+%2F%2F+Use+the+new+slider+value%0A++++widget.%24element%5B0%5D.style.setProperty%28%22--end%22%2C+%28100+-+getSliderPercentage%28sliderValue%29%29+%2B+%27%25%27%29%3B%0A%0A++++%2F%2F+Update+label+visibility+on+slider+change%0A++++updateLabelVisibility%28%29%3B%0A%7D%3B",
|
4
|
-
"styles": ".app-composite-widget.form-group%3Ahas%28.filled-slider%29+%7B%0A++++flex-direction%3A+column%3B%0A++++align-items%3A+start%3B%0A%7D%0A%0A.app-container.filled-slider+%7B%0A++++display%3A+flex%3B%0A++++gap%3A+12px%3B%0A++++position%3A+relative%3B%0A++++width%3A+100%25%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider+%7B%0A++++--start%3A+0%25%3B%0A++++--end%3A+100%25%3B%0A++++display%3A+flex%3B%0A++++align-items%3A+center+%21important%3B%0A++++inline-size%3A+auto%3B%0A++++block-size%3A+1.25rem%3B%0A++++margin%3A+1.125rem+0%3B%0A++++flex%3A+none%3B%0A++++direction%3A+ltr%3B%0A++++flex-grow%3A+1%3B%0A++++width%3A+100%25%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider.vertical+%7B%0A++++flex-direction%3A+row+%21important%3B%0A++++margin%3A+.5rem+auto+%21important%3B%0A++++padding%3A+50%25+0%3B%0A++++transform%3A+rotate%28-90deg%29%3B%0A++++inline-size%3A+100%25%3B%0A%7D%0A%0A.app-container.filled-slider%3Ahas%28.app-slider.slider.cst-slider.vertical%29+%7B%0A++++flex-direction%3A+column%3B%0A%7D%0A%0A.app-container.filled-slider.discrete-slider+%7B%0A++++display%3A+flex%3B%0A++++flex-direction%3A+column%3B%0A%7D%0A%0A%5Bdir%3Drtl%5D+.app-container.filled-slider+.app-slider.slider.cst-slider+%7B%0A++++transform%3A+scaleX%28-1%29%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3Einput+%7B%0A++++appearance%3A+none%3B%0A++++box-shadow%3A+none%3B%0A++++border%3A+none%3B%0A++++outline%3A+none%3B%0A++++pointer-events%3A+none%3B%0A++++inline-size%3A+100%25%3B%0A++++block-size%3A+1rem%3B%0A++++background%3A+none%3B%0A++++z-index%3A+1%3B%0A++++padding%3A+0%3B%0A++++margin%3A+0%3B%0A++++opacity%3A+unset%3B%0A++++color%3A+unset%3B%0A++++height%3A+unset%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3Einput%3Aonly-of-type+%7B%0A++++pointer-events%3A+all%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3Einput%2Binput+%7B%0A++++position%3A+absolute%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3Einput%3A%3A-webkit-slider-thumb+%7B%0A++++appearance%3A+none%3B%0A++++box-shadow%3A+none%3B%0A++++border%3A+none%3B%0A++++outline%3A+none%3B%0A++++pointer-events%3A+all%3B%0A++++block-size%3A+2.75rem%3B%0A++++inline-size%3A+0.25rem%3B%0A++++border-radius%3A+0.25rem%3B%0A++++background%3A+var%28--wm-color-surface-tint%29%3B%0A++++cursor%3A+grab%3B%0A++++margin%3A+0%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3Einput%3A%3A-moz-range-thumb+%7B%0A++++appearance%3A+none%3B%0A++++box-shadow%3A+none%3B%0A++++border%3A+none%3B%0A++++outline%3A+none%3B%0A++++pointer-events%3A+all%3B%0A++++block-size%3A+2.75rem%3B%0A++++inline-size%3A+0.25rem%3B%0A++++border-radius%3A+0.25rem%3B%0A++++background%3A+var%28--wm-color-surface-tint%29%3B%0A++++cursor%3A+grab%3B%0A++++margin%3A+0%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3Einput%3A%3A-webkit-slider-thumb%3Aactive+%7B%0A++++cursor%3A+grabbing%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3Einput%3A%3A-moz-range-thumb%3Aactive+%7B%0A++++cursor%3A+grabbing%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3Einput%3Anot%28%3Adisabled%29%3Ais%28%3Afocus%29%3A%3A-webkit-slider-thumb+%7B%0A++++transform%3A+scaleX%280.6%29%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3Einput%3Anot%28%3Adisabled%29%3Ais%28%3Afocus%29%3A%3A-moz-range-thumb+%7B%0A++++transform%3A+scaleX%280.6%29%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3Einput%3Adisabled+%7B%0A++++cursor%3A+not-allowed%3B%0A++++opacity%3A+1%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3Einput%3Adisabled%3A%3A-moz-range-thumb+%7B%0A++++cursor%3A+not-allowed%3B%0A++++opacity%3A+1%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3Einput%3Adisabled%3A%3A-webkit-slider-thumb+%7B%0A++++background%3A+var%28--wm-color-on-surface%29%3B%0A++++cursor%3A+not-allowed%3B%0A++++opacity%3A+0.38%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3A%3Abefore+%7B%0A++++content%3A+%22%22%3B%0A++++position%3A+absolute%3B%0A++++inline-size%3A+100%25%3B%0A++++block-size%3A+1rem%3B%0A++++border-radius%3A+1rem%3B%0A++++background%3A+var%28--wm-color-primary-container%29%3B%0A++++clip-path%3A+polygon%28calc%28var%28--start%29+-+0.5rem%29+0%2C+0+0%2C+0+100%25%2C+calc%28var%28--start%29+-+0.5rem%29+100%25%2C+calc%28var%28--start%29+-+0.5rem%29+0%2C+calc%28100%25+-+var%28--end%29+%2B+0.5rem%29+0%2C+100%25+0%2C+100%25+100%25%2C+calc%28100%25+-+var%28--end%29+%2B+0.5rem%29+100%25%2C+calc%28100%25+-+var%28--end%29+%2B+0.5rem%29+0%29%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3E.active-slider+%7B%0A++++position%3A+absolute%3B%0A++++block-size%3A+1rem%3B%0A++++border-radius%3A+1rem+0+0+1rem%3B%0A++++background%3A+var%28--wm-color-surface-tint%29%3B%0A++++z-index%3A+0%3B%0A++++float%3A+unset%3B%0A++++vertical-align%3A+baseline%3B%0A++++inset%3A+calc%2850%25+-+0.5rem%29+var%28--end%29+auto+var%28--start%29%3B%0A++++clip-path%3A+polygon%280+0%2C+calc%28100%25+-+0.5rem%29+0%2C+calc%28100%25+-+0.5rem%29+100%25%2C+0+100%25%29%3B%0A++++display%3A+block%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3E.app-slider-value+%7B%0A++++position%3A+absolute%3B%0A++++top%3A+36px%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3E.app-slider-value.pull-left+%7B%0A++++left%3A+0%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3E.app-slider-value.pull-right+%7B%0A++++right%3A+0%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3Ahas%28input%3Adisabled%29%3A%3Abefore+%7B%0A++++background%3A+var%28+--wm-color-on-surface-focus%29%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3Ahas%28input%3Adisabled%29%3Ep.active-slider+%7B%0A++++background%3A+var%28--wm-color-on-surface%29%3B%0A++++opacity%3A+0.38%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider+input%5Btype%3Drange%5D%3A%3A-webkit-slider-runnable-track+%7B%0A++++background%3A+unset%3B%0A++++height%3A+unset%3B%0A++++position%3A+relative%3B%0A%7D%0A%0A%0A%2F*+Ensure+the+container+is+positioned+relatively+to+contain+absolutely+positioned+children+*%2F%0A%0A.app-container.stop-indicator+%7B%0A++++position%3A+relative%3B%0A++++box-sizing%3A+border-box%3B%0A++++width%3A+calc%28100%25+-+48px%29%3B%0A++++margin-inline%3A+auto%3B%0A%7D%0A%0A%0A%2F*+Style+for+individual+step+labels+*%2F%0A%0A.app-container.stop-indicator+.step-label+%7B%0A++++position%3A+absolute%3B%0A++++text-align%3A+center%3B%0A++++white-space%3A+nowrap%3B%0A++++left%3A+var%28--position%2C+0%25%29%3B%0A++++visibility%3A+hidden%3B%0A%7D%0A%0A.app-container.stop-indicator+.step-label.hidden+%7B%0A++++display%3A+none+%21important%3B%0A%7D%0A%0A.app-container.stop-indicator+.step-label.inactive%3A%3Abefore+%7B%0A++++background%3A+var%28--wm-color-primary-container%29%3B%0A%7D%0A%0A.app-container.stop-indicator+.step-label.active%3A%3Abefore+%7B%0A++++background%3A+var%28--wm-color-surface-tint%29%3B%0A%7D%0A%0A.app-container.stop-indicator+.step-label%5Bdata-position%3D%2299%22%5D+%7B%0A++++--position%3A+98.5%25+%21important%3B%0A%7D%0A%0A.app-container.stop-indicator+.step-label%3A%3Abefore+%7B%0A++++position%3A+absolute%3B%0A++++height%3A+4px%3B%0A++++width%3A+4px%3B%0A++++left%3A+var%28--position%2C+0%25%29%3B%0A++++content%3A+%27%27%3B%0A++++top%3A+-30px%3B%0A++++visibility%3A+visible%3B%0A++++background%3A+var%28--wm-color-surface-tint%29%3B%0A++++border-radius%3A+50%25%3B%0A++++display%3A+block%3B%0A%7D",
|
5
|
-
"variables": "%7B+%7D",
|
6
|
-
"config": "%7B%0A%20%20%22widgetType%22%20%3A%20%22wm-custom-widget%22%2C%0A%20%20%22properties%22%20%3A%20%7B%0A%20%20%20%20%22state%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22list%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22State%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20interactivity%20of%20the%20widget.%20%27Enabled%27%20allows%20interaction%20with%20the%20widget%2C%20while%20%27Disabled%27%20makes%20the%20widget%20non-interactive%20and%20inactive.%22%2C%0A%20%20%20%20%20%20%22options%22%20%3A%20%5B%20%22Enabled%22%2C%20%22Disabled%22%20%5D%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22Enabled%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22label_text%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Label%20Text%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Defines%20the%20text%20that%20appears%20on%20the%20widget%E2%80%99s%20label.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22Label%20Text%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22value%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Default%20Value%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Sets%20the%20initial%20value%20of%20the%20slider%20when%20the%20widget%20is%20first%20displayed.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%2250%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22step_value%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Step%20Value%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Defines%20the%20increment%20or%20decrement%20steps%20for%20the%20slider.%20This%20value%20controls%20the%20amount%20by%20which%20the%20slider%E2%80%99s%20value%20changes%20with%20each%20step.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%2210%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22min_value%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22integer%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Minimum%20Value%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20smallest%20value%20the%20slider%20can%20be%20set%20to.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%220%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22max_value%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22integer%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Maximum%20Value%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20largest%20value%20the%20slider%20can%20be%20set%20to.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22100%22%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%20%20%22events%22%20%3A%20%7B%0A%20%20%20%20%22onChange%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22function%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22On%20Change%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Triggered%20when%20the%20slider%E2%80%99s%20value%20changes.%20The%20function%20receives%20parameters%20including%20the%20event%2C%20the%20widget%2C%20the%20new%20value%2C%20and%20the%20previous%20value.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22slider1Change(%24event%2C%20widget%2C%20newVal%2C%20oldVal)%22%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A"
|
7
|
-
};
|
File without changes
|
@@ -1,28 +0,0 @@
|
|
1
|
-
Widget.onReady = function () {
|
2
|
-
var orientation_array = Widget.props.orientation.toLowerCase().split("/");
|
3
|
-
var orientation = orientation_array[0]; // Vertical or Horizontal
|
4
|
-
var length = orientation_array[1];
|
5
|
-
Widget.Widgets.divider1.class = (" " + orientation + "-divider");
|
6
|
-
Widget.Widgets.divider1.class += (" " + length);
|
7
|
-
var divider1 = Widget.Widgets.divider1;
|
8
|
-
if (orientation === "vertical" && length === "full-width") {
|
9
|
-
var vertical_height = "".concat(Widget.props.vertical_height, "px");
|
10
|
-
divider1.$element.css({
|
11
|
-
'height': "".concat(vertical_height),
|
12
|
-
});
|
13
|
-
}
|
14
|
-
else if (orientation === "vertical" && length === "inset") {
|
15
|
-
var vertical_height = Widget.props.vertical_height - 16;
|
16
|
-
vertical_height = "".concat(vertical_height, "px");
|
17
|
-
divider1.$element.css({
|
18
|
-
'height': "".concat(vertical_height),
|
19
|
-
});
|
20
|
-
}
|
21
|
-
else if (orientation === "vertical" && length === "middle-inset") {
|
22
|
-
var vertical_height = Widget.props.vertical_height - 32;
|
23
|
-
vertical_height = "".concat(vertical_height, "px");
|
24
|
-
divider1.$element.css({
|
25
|
-
'height': "".concat(vertical_height),
|
26
|
-
});
|
27
|
-
}
|
28
|
-
};
|
@@ -1,7 +0,0 @@
|
|
1
|
-
export var divider = {
|
2
|
-
markup: "%3Cwm-custom-widget-container%3E%0A++++%3Cwm-container+name%3D%22divider1%22+class%3D%22horizontal-divider+full-width%22+style%3D%22+%22%3E%3C%2Fwm-container%3E%0A%0A++++%3C%21--+Height+of+vertical+divider+will+be+supplied+using+inline+styles+and+the+value+can+be+picked+up+from+node+css.+%0A++++A+minimum+height+has+been+defined+in+the+event+that+the+user+uses+a+custom+widget+divider.+--%3E%0A%3C%2Fwm-custom-widget-container%3E",
|
3
|
-
script: "Widget.onReady+%3D+function%28%29+%7B%0A++++const+orientation_array+%3D+Widget.props.orientation.toLowerCase%28%29.split%28%22%2F%22%29%3B%0A++++const+orientation+%3D+orientation_array%5B0%5D%3B+%2F%2F+Vertical+or+Horizontal%0A++++const+length+%3D+orientation_array%5B1%5D%3B%0A%0A++++Widget.Widgets.divider1.class+%3D+%28%22+%22+%2B+orientation+%2B+%22-divider%22%29%3B%0A++++Widget.Widgets.divider1.class+%2B%3D+%28%22+%22+%2B+length%29%3B%0A++++let+divider1+%3D+Widget.Widgets.divider1%3B%0A%0A++++if+%28orientation+%3D%3D%3D+%22vertical%22+%26%26+length+%3D%3D%3D+%22full-width%22%29+%7B%0A++++++++let+vertical_height+%3D+%60%24%7BWidget.props.vertical_height%7Dpx%60%3B%0A++++++++divider1.%24element.css%28%7B%0A++++++++++++%27height%27%3A+%60%24%7Bvertical_height%7D%60%2C%0A++++++++%7D%29%3B%0A++++%7D+else+if+%28orientation+%3D%3D%3D+%22vertical%22+%26%26+length+%3D%3D%3D+%22inset%22%29+%7B%0A++++++++let+vertical_height+%3D+Widget.props.vertical_height+-+16%3B%0A++++++++vertical_height+%3D+%60%24%7Bvertical_height%7Dpx%60%3B%0A++++++++divider1.%24element.css%28%7B%0A++++++++++++%27height%27%3A+%60%24%7Bvertical_height%7D%60%2C%0A++++++++%7D%29%3B%0A++++%7D+else+if+%28orientation+%3D%3D%3D+%22vertical%22+%26%26+length+%3D%3D%3D+%22middle-inset%22%29+%7B%0A++++++++let+vertical_height+%3D+Widget.props.vertical_height+-+32%3B%0A++++++++vertical_height+%3D+%60%24%7Bvertical_height%7Dpx%60%3B%0A++++++++divider1.%24element.css%28%7B%0A++++++++++++%27height%27%3A+%60%24%7Bvertical_height%7D%60%2C%0A++++++++%7D%29%3B%0A++++%7D%0A%0A%7D",
|
4
|
-
styles: ".horizontal-divider+%7B%0A++++display%3A+flex%3B%0A++++border-top%3A+1px+solid+%23CAC4D0%3B%0A++++height%3A+1px+%21important%3B%0A%7D%0A%0A.app-container%3E.horizontal-divider.full-width+%7B%0A++++width%3A+100%25%3B%0A++++margin%3A+auto%3B%0A++++padding%3A+0px%3B%0A%7D%0A%0A.horizontal-divider.inset+%7B%0A++++margin-left%3A+16px%3B%0A%7D%0A%0A.horizontal-divider.middle-inset+%7B%0A++++display%3A+flex%3B%0A++++margin-left%3A+16px%3B%0A++++margin-right%3A+16px%3B%0A%7D%0A%0A.vertical-divider+%7B%0A++++width%3A+1px%3B%0A++++border-left%3A+1px+solid+%23CAC4D0%3B%0A++++min-height%3A+1px%3B%0A%7D%0A%0A.vertical-divider.full-width+%7B%0A++++margin-top%3A+0%3B%0A++++margin-bottom%3A+0%3B%0A%7D%0A%0A.vertical-divider.inset+%7B%0A++++margin-top%3A+16px%3B%0A++++box-sizing%3A+border-box%3B%0A%7D%0A%0A.vertical-divider.middle-inset+%7B%0A++++margin-top%3A+16px%3B%0A++++margin-bottom%3A+16px%3B%0A%7D",
|
5
|
-
variables: "%7B+%7D",
|
6
|
-
config: "%7B%0A%20%20%22widgetType%22%20%3A%20%22wm-custom-widget%22%2C%0A%20%20%22properties%22%20%3A%20%7B%0A%20%20%20%20%22orientation%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22list%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Orientation%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Determines%20the%20style%20of%20the%20M3%20divider%20being%20used.%20Default%20value%20is%20horizontal%2Ffull-width.%22%2C%0A%20%20%20%20%20%20%22options%22%20%3A%20%5B%20%22horizontal%2Ffull-width%22%2C%20%22horizontal%2Fmiddle-inset%22%2C%20%22horizontal%2Finset%22%2C%20%22vertical%2Ffull-width%22%2C%20%22vertical%2Fmiddle-inset%22%2C%20%22vertical%2Finset%22%20%5D%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22horizontal%2Ffull-width%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22vertical_height%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22integer%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Height%20(only%20for%20vertical)%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Determines%20the%20height%20of%20the%20vertical%20divider%20(in%20px)%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%202%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%20%20%22events%22%20%3A%20%7B%0A%20%20%20%20%22onRender%22%20%3A%20%7B%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Callback%20action%20to%20test%20event%20in%20the%20properties%20panel%22%2C%0A%20%20%20%20%20%20%22eventData%22%20%3A%20%22%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Render%22%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D"
|
7
|
-
};
|
File without changes
|
@@ -1,24 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Use App.getDependency for Dependency Injection
|
3
|
-
* eg: var DialogService = App.getDependency('DialogService');
|
4
|
-
*/
|
5
|
-
/* perform any action on widgets/variables within this block */
|
6
|
-
Widget.onReady = function () {
|
7
|
-
/*
|
8
|
-
* variables can be accessed through 'Widget.Variables' property here
|
9
|
-
* e.g. to get dataSet in a staticVariable named 'loggedInUser' use following script
|
10
|
-
* Widget.Variables.loggedInUser.getData()
|
11
|
-
*
|
12
|
-
* widgets can be accessed through 'Widget.Widgets' property here
|
13
|
-
* e.g. to get value of text widget named 'username' use following script
|
14
|
-
* 'Widget.Widgets.username.datavalue'
|
15
|
-
*/
|
16
|
-
Widget.Widgets.iconButton.class += " " + Widget.props.style;
|
17
|
-
Widget.Widgets.iconButton.class += " " + Widget.props.tonal;
|
18
|
-
if (Widget.props.button_size == "small") {
|
19
|
-
Widget.Widgets.iconButton.class += " " + "icon-btn-sm";
|
20
|
-
}
|
21
|
-
else if (Widget.props.button_size == "large") {
|
22
|
-
Widget.Widgets.iconButton.class += " " + "icon-btn-lg";
|
23
|
-
}
|
24
|
-
};
|
@@ -1,7 +0,0 @@
|
|
1
|
-
export var icon_button = {
|
2
|
-
markup: "%3Cwm-custom-widget-container%3E%0A++++%3Cwm-button+class%3D%22icon-btn%22+caption%3D%22%22+type%3D%22button%22+margin%3D%22unset%22+name%3D%22iconButton%22+iconclass%3D%22bind%3Aprops.icon_class%22+disabled%3D%22bind%3Aprops.state+%3D%3D+%26quot%3BDisabled%26quot%3B%22%3E%3C%2Fwm-button%3E%0A%3C%2Fwm-custom-widget-container%3E",
|
3
|
-
script: "%2F*%0A+*+Use+App.getDependency+for+Dependency+Injection%0A+*+eg%3A+var+DialogService+%3D+App.getDependency%28%27DialogService%27%29%3B%0A+*%2F%0A%0A%2F*+perform+any+action+on+widgets%2Fvariables+within+this+block+*%2F%0AWidget.onReady+%3D+function%28%29+%7B%0A++++%2F*%0A+++++*+variables+can+be+accessed+through+%27Widget.Variables%27+property+here%0A+++++*+e.g.+to+get+dataSet+in+a+staticVariable+named+%27loggedInUser%27+use+following+script%0A+++++*+Widget.Variables.loggedInUser.getData%28%29%0A+++++*%0A+++++*+widgets+can+be+accessed+through+%27Widget.Widgets%27+property+here%0A+++++*+e.g.+to+get+value+of+text+widget+named+%27username%27+use+following+script%0A+++++*+%27Widget.Widgets.username.datavalue%27%0A+++++*%2F%0A%0A++++Widget.Widgets.iconButton.class+%2B%3D+%22+%22+%2B+Widget.props.style.toLowerCase%28%29%3B%0A%0A++++if+%28Widget.props.tonal+%21%3D%3D+%22None%22%29+%7B%0A++++++++Widget.Widgets.iconButton.class+%2B%3D+%22+%22+%2B+Widget.props.tonal.toLowerCase%28%29%3B%0A++++%7D+else+%7B%0A++++++++if+%28Widget.Widgets.iconButton.class.includes%28%22success%22%29%29+%7B%0A++++++++++++Widget.Widgets.iconButton.class.remove%28%22success%22%29%3B%0A++++++++%7D+else+if+%28Widget.Widgets.iconButton.class.includes%28%22error%22%29%29+%7B%0A++++++++++++Widget.Widgets.iconButton.class.remove%28%22error%22%29%3B%0A++++++++%7D+else+if+%28Widget.Widgets.iconButton.class.includes%28%22warning%22%29%29+%7B%0A++++++++++++Widget.Widgets.iconButton.class.remove%28%22warning%22%29%3B%0A++++++++%7D+else+if+%28Widget.Widgets.iconButton.class.includes%28%22info%22%29%29+%7B%0A++++++++++++Widget.Widgets.iconButton.class.remove%28%22info%22%29%3B%0A++++++++%7D%0A++++%7D%0A++++if+%28Widget.props.button_size+%3D%3D+%22Small%22%29+%7B%0A++++++++Widget.Widgets.iconButton.class+%2B%3D+%22+%22+%2B+%22icon-btn-sm%22%3B%0A++++%7D+else+if+%28Widget.props.button_size+%3D%3D+%22Large%22%29+%7B%0A++++++++Widget.Widgets.iconButton.class+%2B%3D+%22+%22+%2B+%22icon-btn-lg%22%3B%0A++++%7D+else+if+%28Widget.props.button_size+%3D%3D+%22Regular%22%29+%7B%0A++++++++if+%28Widget.Widgets.iconButton.class.includes%28%22icon-btn-sm%22%29%29+%7B%0A++++++++++++Widget.Widgets.iconButton.class.remove%28%22icon-btn-sm%22%29%3B%0A++++++++%7D+else+if+%28Widget.Widgets.iconButton.class.includes%28%22icon-btn-lg%22%29%29+%7B%0A++++++++++++Widget.Widgets.iconButton.class.remove%28%22icon-btn-lg%22%29%3B%0A++++++++%7D%0A++++%7D%0A%7D%3B",
|
4
|
-
styles: ".app-button.icon-btn+.app-icon+%7B%0A++++padding%3A+0%3B%0A++++font-size%3A+24px%3B%0A%7D%0A%0A.app-button.icon-btn+%7B%0A++++display%3A+inline-flex%3B%0A++++justify-content%3A+center%3B%0A++++align-items%3A+center%3B%0A++++padding%3A+8px%3B%0A++++min-height%3A+40px%3B%0A++++min-width%3A+40px%3B%0A++++border-radius%3A+100%25%3B%0A++++box-shadow%3A+none%3B%0A++++border-color%3A+transparent%3B%0A++++background-color%3A+transparent%3B%0A%7D%0A%0A.app-button.icon-btn%3A%3Abefore+%7B%0A++++content%3A+%27%27%3B%0A++++position%3A+absolute%3B%0A++++opacity%3A+0%3B%0A++++height%3A+100%25%3B%0A++++width%3A+100%25%3B%0A++++border-radius%3A+100%25%3B%0A%7D%0A%0A.app-button.icon-btn%3Ahover%3A%3Abefore+%7B%0A++++background%3A+var%28--wm-state-on-surface-variant-hover%29%3B%0A++++opacity%3A+1%3B%0A%7D%0A%0A.app-button.icon-btn%3Aactive%3A%3Abefore+%7B%0A++++background%3A+var%28--wm-state-on-surface-variant-active%29%3B%0A++++opacity%3A+1%3B%0A%7D%0A%0A.app-button.icon-btn%3Afocus%3A%3Abefore+%7B%0A++++background%3A+var%28--wm-state-on-surface-variant-focus%29%3B%0A++++opacity%3A+1%3B%0A%7D%0A%0A.app-button.icon-btn.filled+%7B%0A++++background%3A+var%28--wm-color-primary%29%3B%0A++++color%3A+var%28--wm-color-on-primary%29%3B%0A%7D%0A%0A.app-button.icon-btn.filled%3Ahover%3A%3Abefore+%7B%0A++++background%3A+var%28--wm-state-on-primary-hover%29%3B%0A++++opacity%3A+1%3B%0A%7D%0A%0A.app-button.icon-btn.filled%3Afocus%3A%3Abefore+%7B%0A++++background%3A+var%28--wm-state-on-primary-focus%29%3B%0A++++opacity%3A+1%3B%0A%7D%0A%0A.app-button.icon-btn.filled%3Aactive%3A%3Abefore+%7B%0A++++background%3A+var%28--wm-state-on-primary-active%29%3B%0A++++opacity%3A+1%3B%0A%7D%0A%0A.app-button.icon-btn.outlined+%7B%0A++++color%3A+var%28--wm-color-on-surface-variant%29%3B%0A++++border%3A+1px+solid+var%28--wm-color-outline%29%3B%0A%7D%0A%0A.app-button.icon-btn.filled%3Adisabled%2C%0A.app-button.icon-btn.filled.success%3Adisabled%2C%0A.app-button.icon-btn.filled.danger%3Adisabled%2C%0A.app-button.icon-btn.filled.info%3Adisabled%2C%0A.app-button.icon-btn.filled.warning%3Adisabled+%7B%0A++++background%3A+var%28--wm-state-on-surface-focus%29%3B%0A++++opacity%3A+1%3B%0A%7D%0A%0A.app-button.icon-btn.outlined%3Adisabled%2C%0A.app-button.icon-btn.outlined.success%3Adisabled%2C%0A.app-button.icon-btn.outlined.danger%3Adisabled%2C%0A.app-button.icon-btn.outlined.info%3Adisabled%2C%0A.app-button.icon-btn.outlined.warning%3Adisabled+%7B%0A++++border-color%3A+var%28--wm-state-on-surface-focus%29%3B%0A%7D%0A%0A.app-button.icon-btn.filled%3Adisabled+.app-icon%2C%0A.app-button.icon-btn.outlined%3Adisabled+.app-icon%2C%0A.app-button.icon-btn.standard%3Adisabled+.app-icon%2C%0A.app-button.icon-btn.filled.success%3Adisabled+.app-icon%2C%0A.app-button.icon-btn.filled.danger%3Adisabled+.app-icon%2C%0A.app-button.icon-btn.filled.info%3Adisabled+.app-icon%2C%0A.app-button.icon-btn.filled.warning%3Adisabled+.app-icon%2C%0A.app-button.icon-btn.outlined.success%3Adisabled+.app-icon%2C%0A.app-button.icon-btn.outlined.danger%3Adisabled+.app-icon%2C%0A.app-button.icon-btn.outlined.warning%3Adisabled+.app-icon%2C%0A.app-button.icon-btn.outlined.info%3Adisabled+.app-icon%2C%0A.app-button.icon-btn.standard.success%3Adisabled+.app-icon%2C%0A.app-button.icon-btn.standard.danger%3Adisabled+.app-icon%2C%0A.app-button.icon-btn.standard.warning%3Adisabled+.app-icon%2C%0A.app-button.icon-btn.standard.info%3Adisabled+.app-icon+%7B%0A++++opacity%3A+0.38%3B%0A++++color%3A+var%28--wm-color-on-surface%29%3B%0A%7D%0A%0A.app-button.icon-btn.filled.icon-btn-sm%2C%0A.app-button.icon-btn.standard.icon-btn-sm%2C%0A.app-button.icon-btn.outlined.icon-btn-sm+%7B%0A++++display%3A+inline-flex%3B%0A++++justify-content%3A+center%3B%0A++++align-items%3A+center%3B%0A++++min-height%3A+32px%3B%0A++++min-width%3A+32px%3B%0A++++padding%3A+4px%3B%0A%7D%0A%0A.app-button.icon-btn.filled.icon-btn-sm+.app-icon%2C%0A.app-button.icon-btn.standard.icon-btn-sm+.app-icon%2C%0A.app-button.icon-btn.outlined.icon-btn-sm+.app-icon+%7B%0A++++font-size%3A+18px%3B%0A%7D%0A%0A.app-button.icon-btn.filled.icon-btn-lg%2C%0A.app-button.icon-btn.standard.icon-btn-lg%2C%0A.app-button.icon-btn.outlined.icon-btn-lg+%7B%0A++++display%3A+inline-flex%3B%0A++++justify-content%3A+center%3B%0A++++align-items%3A+center%3B%0A++++min-height%3A+48px%3B%0A++++min-width%3A+48px%3B%0A++++padding%3A+4px%3B%0A%7D%0A%0A.app-button.icon-btn.filled.icon-btn-lg+.app-icon%2C%0A.app-button.icon-btn.standard.icon-btn-lg+.app-icon%2C%0A.app-button.icon-btn.outlined.icon-btn-lg+.app-icon+%7B%0A++++font-size%3A+32px%3B%0A%7D%0A%0A.app-button.icon-btn.standard.success+.app-icon%2C%0A.app-button.icon-btn.outlined.success+.app-icon+%7B%0A++++color%3A+var%28--wm-color-success%29%3B%0A%7D%0A%0A.app-button.icon-btn.standard.success%3Ahover%3A%3Abefore%2C%0A.app-button.icon-btn.outlined.success%3Ahover%3A%3Abefore+%7B%0A++++background%3A+var%28--wm-state-success-hover%29%3B%0A++++opacity%3A+1%3B%0A%7D%0A%0A.app-button.icon-btn.standard.success%3Afocus%3A%3Abefore%2C%0A.app-button.icon-btn.outlined.success%3Afocus%3A%3Abefore+%7B%0A++++background%3A+var%28--wm-state-success-focus%29%3B%0A++++opacity%3A+1%3B%0A%7D%0A%0A.app-button.icon-btn.standard.success%3Aactive%3A%3Abefore%2C%0A.app-button.icon-btn.outlied.success%3Aactive%3A%3Abefore+%7B%0A++++background%3A+var%28--wm-state-success-active%29%3B%0A++++opacity%3A+1%3B%0A%7D%0A%0A.app-button.icon-btn.outlined.success+%7B%0A++++border%3A+1px+solid+var%28--wm-color-success%29%3B%0A%7D%0A%0A.app-button.icon-btn.filled.success+%7B%0A++++background%3A+var%28--wm-color-success%29%3B%0A++++color%3A+var%28--wm-color-on-success%29%3B%0A%7D%0A%0A.app-button.icon-btn.standard.info+.app-icon%2C%0A.app-button.icon-btn.outlined.info+.app-icon+%7B%0A++++color%3A+var%28--wm-color-info%29%3B%0A%7D%0A%0A.app-button.icon-btn.standard.info%3Ahover%3A%3Abefore%2C%0A.app-button.icon-btn.outlined.info%3Ahover%3A%3Abefore+%7B%0A++++background%3A+var%28--wm-state-info-hover%29%3B%0A++++opacity%3A+1%3B%0A%7D%0A%0A.app-button.icon-btn.standard.info%3Afocus%3A%3Abefore%2C%0A.app-button.icon-btn.outlined.info%3Afocus%3A%3Abefore+%7B%0A++++background%3A+var%28--wm-state-info-focus%29%3B%0A++++opacity%3A+1%3B%0A%7D%0A%0A.app-button.icon-btn.standard.info%3Aactive%3A%3Abefore%2C%0A.app-button.icon-btn.outlied.info%3Aactive%3A%3Abefore+%7B%0A++++background%3A+var%28--wm-state-info-active%29%3B%0A++++opacity%3A+1%3B%0A%7D%0A%0A.app-button.icon-btn.outlined.info+%7B%0A++++border%3A+1px+solid+var%28--wm-color-info%29%3B%0A%7D%0A%0A.app-button.icon-btn.filled.info+%7B%0A++++background%3A+var%28--wm-color-info%29%3B%0A++++color%3A+var%28--wm-color-on-info%29%3B%0A%7D%0A%0A.app-button.icon-btn.standard.error+.app-icon%2C%0A.app-button.icon-btn.outlined.error+.app-icon+%7B%0A++++color%3A+var%28--wm-color-error%29%3B%0A%7D%0A%0A.app-button.icon-btn.standard.error%3Ahover%3A%3Abefore%2C%0A.app-button.icon-btn.outlined.error%3Ahover%3A%3Abefore+%7B%0A++++background%3A+var%28--wm-state-error-hover%29%3B%0A++++opacity%3A+1%3B%0A%7D%0A%0A.app-button.icon-btn.standard.error%3Afocus%3A%3Abefore%2C%0A.app-button.icon-btn.outlined.error%3Afocus%3A%3Abefore+%7B%0A++++background%3A+var%28--wm-state-error-focus%29%3B%0A++++opacity%3A+1%3B%0A%7D%0A%0A.app-button.icon-btn.standard.error%3Aactive%3A%3Abefore%2C%0A.app-button.icon-btn.outlied.error%3Aactive%3A%3Abefore+%7B%0A++++background%3A+var%28--wm-state-error-active%29%3B%0A++++opacity%3A+1%3B%0A%7D%0A%0A.app-button.icon-btn.outlined.error+%7B%0A++++border%3A+1px+solid+var%28--wm-color-error%29%3B%0A%7D%0A%0A.app-button.icon-btn.filled.error+%7B%0A++++background%3A+var%28--wm-color-error%29%3B%0A++++color%3A+var%28--wm-color-on-error%29%3B%0A%7D%0A%0A.app-button.icon-btn.standard.warning+.app-icon%2C%0A.app-button.icon-btn.outlined.warning+.app-icon+%7B%0A++++color%3A+var%28--wm-color-warning%29%3B%0A%7D%0A%0A.app-button.icon-btn.standard.warning%3Ahover%3A%3Abefore%2C%0A.app-button.icon-btn.outlined.warning%3Ahover%3A%3Abefore+%7B%0A++++background%3A+var%28--wm-state-warning-hover%29%3B%0A++++opacity%3A+1%3B%0A%7D%0A%0A.app-button.icon-btn.standard.warning%3Afocus%3A%3Abefore%2C%0A.app-button.icon-btn.outlined.warning%3Afocus%3A%3Abefore+%7B%0A++++background%3A+var%28--wm-state-warning-focus%29%3B%0A++++opacity%3A+1%3B%0A%7D%0A%0A.app-button.icon-btn.standard.warning%3Aactive%3A%3Abefore%2C%0A.app-button.icon-btn.outlied.warning%3Aactive%3A%3Abefore+%7B%0A++++background%3A+var%28--wm-state-warning-active%29%3B%0A++++opacity%3A+1%3B%0A%7D%0A%0A.app-button.icon-btn.outlined.warning+%7B%0A++++border%3A+1px+solid+var%28--wm-color-warning%29%3B%0A%7D%0A%0A.app-button.icon-btn.filled.warning+%7B%0A++++background%3A+var%28--wm-color-warning%29%3B%0A++++color%3A+var%28--wm-color-on-warning%29%3B%0A%7D",
|
5
|
-
variables: "%7B+%7D",
|
6
|
-
config: "%7B%0A%09%22widgetType%22%3A%20%22wm-custom-widget%22%2C%0A%09%22properties%22%3A%20%7B%0A%09%09%22style%22%3A%20%7B%0A%09%09%09%22type%22%3A%20%22list%22%2C%0A%09%09%09%22displayName%22%3A%20%22Style%22%2C%0A%09%09%09%22description%22%3A%20%22%22%2C%0A%09%09%09%22options%22%3A%20%5B%22Filled%22%2C%20%22Outlined%22%2C%20%22Standard%22%5D%2C%0A%09%09%09%22value%22%3A%20%22Standard%22%0A%09%09%7D%2C%0A%09%09%22state%22%3A%20%7B%0A%09%09%09%22type%22%3A%20%22list%22%2C%0A%09%09%09%22displayName%22%3A%20%22State%22%2C%0A%09%09%09%22description%22%3A%20%22%22%2C%0A%09%09%09%22options%22%3A%20%5B%22Enabled%22%2C%20%22Disabled%22%5D%2C%0A%09%09%09%22value%22%3A%20%22Enabled%22%0A%09%09%7D%2C%0A%09%09%22icon_class%22%3A%20%7B%0A%09%09%09%22type%22%3A%20%22string%22%2C%0A%09%09%09%22displayName%22%3A%20%22Icon%20class%22%2C%0A%09%09%09%22description%22%3A%20%22%22%2C%0A%09%09%09%22value%22%3A%20%22fa%20fa-gear%22%2C%0A%09%09%09%22widget%22%3A%20%22select-icon%22%0A%09%09%7D%2C%0A%09%09%22button_size%22%3A%20%7B%0A%09%09%09%22type%22%3A%20%22list%22%2C%0A%09%09%09%22displayName%22%3A%20%22Button%20size%22%2C%0A%09%09%09%22description%22%3A%20%22This%20is%20an%20optinal%20property.%20the%20value%20for%20this%20property%20must%20be%20either%20small%20or%20large%22%2C%0A%09%09%09%22options%22%3A%20%5B%22Small%22%2C%20%22Regular%22%2C%20%22Large%22%5D%2C%0A%09%09%09%22value%22%3A%20%22Regular%22%0A%09%09%7D%2C%0A%09%09%22tonal%22%3A%20%7B%0A%09%09%09%22type%22%3A%20%22list%22%2C%0A%09%09%09%22displayName%22%3A%20%22Tonal%22%2C%0A%09%09%09%22description%22%3A%20%22This%20is%20an%20optinal%20property.%20The%20value%20for%20this%20property%20must%20be%20either%20success%2C%20error%2C%20info%20or%20warning%22%2C%0A%09%09%09%22options%22%3A%20%5B%22None%22%2C%20%22Success%22%2C%20%22Error%22%2C%20%22Info%22%2C%20%22Warning%22%5D%2C%0A%09%09%09%22value%22%3A%20%22None%22%0A%09%09%7D%0A%09%7D%2C%0A%09%22events%22%3A%20%7B%0A%09%09%22onRender%22%3A%20%7B%0A%09%09%09%22description%22%3A%20%22Callback%20action%20to%20test%20event%20in%20the%20properties%20panel%22%2C%0A%09%09%09%22eventData%22%3A%20%22%22%2C%0A%09%09%09%22displayName%22%3A%20%22Render%22%0A%09%09%7D%0A%09%7D%0A%7D%0A",
|
7
|
-
};
|
File without changes
|