type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
ArrowFunction
(options: string[]) => { const newOptions = options.map((option) => t(`wearable.rarity.${option}`).toLowerCase()) onBrowse({ wearableRarities: newOptions as WearableRarity[] }) }
blockfishio/spacey-marketplace
webapp/src/components/Vendor/decentraland/NFTFilters/NFTFilters.tsx
TypeScript
ArrowFunction
(option) => t(`wearable.rarity.${option}`).toLowerCase()
blockfishio/spacey-marketplace
webapp/src/components/Vendor/decentraland/NFTFilters/NFTFilters.tsx
TypeScript
ArrowFunction
(options: string[]) => { onBrowse({ wearableGenders: options as WearableGender[] }) }
blockfishio/spacey-marketplace
webapp/src/components/Vendor/decentraland/NFTFilters/NFTFilters.tsx
TypeScript
ArrowFunction
(contract: string) => { onBrowse({ contracts: [contract as ContractName] }) }
blockfishio/spacey-marketplace
webapp/src/components/Vendor/decentraland/NFTFilters/NFTFilters.tsx
TypeScript
ArrowFunction
(newSearch: string) => { if (search !== newSearch) { onBrowse({ search: newSearch, isMap: false, isFullscreen: false }) } }
blockfishio/spacey-marketplace
webapp/src/components/Vendor/decentraland/NFTFilters/NFTFilters.tsx
TypeScript
ArrowFunction
() => setShowFiltersMenu(false)
blockfishio/spacey-marketplace
webapp/src/components/Vendor/decentraland/NFTFilters/NFTFilters.tsx
TypeScript
MethodDeclaration
isMap ? ( <
blockfishio/spacey-marketplace
webapp/src/components/Vendor/decentraland/NFTFilters/NFTFilters.tsx
TypeScript
MethodDeclaration
t('nft_filters.on_sale')
blockfishio/spacey-marketplace
webapp/src/components/Vendor/decentraland/NFTFilters/NFTFilters.tsx
TypeScript
MethodDeclaration
t('nft_filters.filter')
blockfishio/spacey-marketplace
webapp/src/components/Vendor/decentraland/NFTFilters/NFTFilters.tsx
TypeScript
MethodDeclaration
t('nft_filters.order_by')
blockfishio/spacey-marketplace
webapp/src/components/Vendor/decentraland/NFTFilters/NFTFilters.tsx
TypeScript
MethodDeclaration
t('global.apply')
blockfishio/spacey-marketplace
webapp/src/components/Vendor/decentraland/NFTFilters/NFTFilters.tsx
TypeScript
ClassDeclaration
export class MasterPlanOnly { requestName: string; sponsor: string; coSponsor: string; requestedStartyear: number; goal: string; constructor() { this.requestName = ""; this.sponsor = ""; this.coSponsor = ""; this.requestedStartyear = 0; this.goal = ""; } }
milehighfd/confluence-mhfd-frontend
src/Classes/Study/MasterPlanOnly.ts
TypeScript
TypeAliasDeclaration
export type Appointment = { id: string, psychologistId: string, appointmentDate: string, patientId: string, deleted: boolean }
betagouv/sante-psy
types/Appointment.ts
TypeScript
ArrowFunction
() => { // make sure the target is the active editor so we do not // commit prematurely if (activeNode && activeNode.contains(target) && this.grid.getEditorLock().isActive()) { this.grid.getEditorLock().commitCurrentEdit(); } }
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
ArrowFunction
(processResult: GraphqlResult) => { const datasetName = (backendApi && backendApi.service && typeof backendApi.service.getDatasetName === 'function') ? backendApi.service.getDatasetName() : ''; if (processResult && processResult.data && processResult.data[datasetName]) { this._dataset = processResult.data[datasetName].nodes; if (processResult.data[datasetName].listSeparator) { // if the "listSeparator" is available in the GraphQL result, we'll override the ExportOptions Delimiter with this new info if (!this.gridOptions.exportOptions) { this.gridOptions.exportOptions = {}; } this.gridOptions.exportOptions.delimiterOverride = processResult.data[datasetName].listSeparator.toString(); } this.refreshGridData(this._dataset, processResult.data[datasetName].totalCount); } else { this._dataset = []; } }
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
ArrowFunction
(event) => { if (gridOptions.enableTranslate) { this.extensionService.translateColumnHeaders(); this.extensionService.translateColumnPicker(); this.extensionService.translateGridMenu(); this.extensionService.translateHeaderMenu(); } }
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
ArrowFunction
(e: any, args: any) => { return this.dispatchCustomEvent(`${slickgridEventPrefix}${titleCase(prop)}`, { eventData: e, args }); }
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
ArrowFunction
(gridStateChange: GridStateChange) => { this.onGridStateChanged.emit(gridStateChange); }
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
ArrowFunction
(e: any, args: any) => { grid.invalidate(); }
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
ArrowFunction
(e: any, args: any) => { if (args && args.rows && Array.isArray(args.rows)) { args.rows.forEach((row) => grid.updateRow(row)); grid.render(); } }
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
ArrowFunction
(row) => grid.updateRow(row)
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
ArrowFunction
(rowNumber: number) => { const item = this.dataView.getItem(rowNumber); return gridOptions.colspanCallback(item); }
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
ArrowFunction
() => { // keep start time & end timestamps & return it after process execution const startTime = new Date(); // run any pre-process, if defined, for example a spinner if (backendApi.preProcess) { backendApi.preProcess(); } try { // the processes can be Observables (like HttpClient) or Promises if (process instanceof Promise && process.then) { process.then((processResult: GraphqlResult | any) => executeBackendProcessesCallback(startTime, processResult, backendApi, this.gridOptions.pagination.totalItems)); } else if (isObservable(process)) { process.subscribe( (processResult: GraphqlResult | any) => executeBackendProcessesCallback(startTime, processResult, backendApi, this.gridOptions.pagination.totalItems), (error: any) => onBackendError(error, backendApi) ); } } catch (error) { onBackendError(error, backendApi); } }
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
ArrowFunction
(processResult: GraphqlResult | any) => executeBackendProcessesCallback(startTime, processResult, backendApi, this.gridOptions.pagination.totalItems)
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
ArrowFunction
(error: any) => onBackendError(error, backendApi)
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
ArrowFunction
(resolvedCollection) => this.updateEditorCollection(column, resolvedCollection)
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
ArrowFunction
(column: Column | any) => { // on every Editor that have a "collectionAsync", resolve the data and assign it to the "collection" property if (column.editor && column.editor.collectionAsync) { this.loadEditorCollectionAsync(column); } return { ...column, editor: column.editor && column.editor.model, internalColumnEditor: { ...column.editor } }; }
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
ArrowFunction
(col: Column) => col.id === column.id
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
MethodDeclaration
ngOnInit(): void { this.onBeforeGridCreate.emit(true); if (this.gridOptions && !this.gridOptions.enableAutoResize && (this._fixedHeight || this._fixedWidth)) { this.gridHeightString = `${this._fixedHeight}px`; this.gridWidthString = `${this._fixedWidth}px`; } }
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
MethodDeclaration
ngOnDestroy(): void { this.onBeforeGridDestroy.emit(this.grid); this.destroy(); this.onAfterGridDestroyed.emit(true); }
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
MethodDeclaration
destroy(emptyDomElementContainer = false) { const gridContainerId = this.gridOptions && this.gridOptions.gridContainerId; this.dataView = undefined; this.gridOptions = {}; this.extensionService.dispose(); this.filterService.dispose(); this.gridEventService.dispose(); this.gridStateService.dispose(); this.groupingAndColspanService.dispose(); this.paginationService.dispose(); this.resizer.dispose(); this.sortService.dispose(); if (this._eventHandler && this._eventHandler.unsubscribeAll) { this._eventHandler.unsubscribeAll(); } if (this.grid && this.grid.destroy) { this.grid.destroy(); } if (emptyDomElementContainer) { $(gridContainerId).empty(); } // also unsubscribe all RxJS subscriptions this.subscriptions = unsubscribeAllObservables(this.subscriptions); }
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
MethodDeclaration
ngAfterViewInit() { this.initialization(); this.isGridInitialized = true; // user must provide a "gridHeight" or use "autoResize: true" in the grid options if (!this._fixedHeight && !this.gridOptions.enableAutoResize) { throw new Error( `[Angular-Slickgrid] requires a "grid-height" or the "enableAutoResize" grid option to be enabled. Without that the grid will seem empty while in fact it just does not have any height define.` ); } }
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
MethodDeclaration
initialization() { // make sure the dataset is initialized (if not it will throw an error that it cannot getLength of null) this._dataset = this._dataset || []; this.gridOptions = this.mergeGridOptions(this.gridOptions); this.paginationOptions = this.gridOptions.pagination; this.locales = this.gridOptions && this.gridOptions.locales || Constants.locales; this.backendServiceApi = this.gridOptions && this.gridOptions.backendServiceApi; this.createBackendApiInternalPostProcessCallback(this.gridOptions); if (!this.customDataView) { if (this.gridOptions.draggableGrouping || this.gridOptions.enableGrouping) { this.extensionUtility.loadExtensionDynamically(ExtensionName.groupItemMetaProvider); this.groupItemMetadataProvider = new Slick.Data.GroupItemMetadataProvider(); this.sharedService.groupItemMetadataProvider = this.groupItemMetadataProvider; this.dataView = new Slick.Data.DataView({ groupItemMetadataProvider: this.groupItemMetadataProvider }); } else { this.dataView = new Slick.Data.DataView(); } } // for convenience to the user, we provide the property "editor" as an Angular-Slickgrid editor complex object // however "editor" is used internally by SlickGrid for it's own Editor Factory // so in our lib we will swap "editor" and copy it into a new property called "internalColumnEditor" // then take back "editor.model" and make it the new "editor" so that SlickGrid Editor Factory still works this._columnDefinitions = this.swapInternalEditorToSlickGridFactoryEditor(this._columnDefinitions); // save reference for all columns before they optionally become hidden/visible this.sharedService.allColumns = this._columnDefinitions; this.sharedService.visibleColumns = this._columnDefinitions; this.extensionService.createExtensionsBeforeGridCreation(this._columnDefinitions, this.gridOptions); // build SlickGrid Grid, also user might optionally pass a custom dataview (e.g. remote model) this.grid = new Slick.Grid(`#${this.gridId}`, this.customDataView || this.dataView, this._columnDefinitions, this.gridOptions); this.sharedService.dataView = this.dataView; this.sharedService.grid = this.grid; this.extensionService.bindDifferentExtensions(); this.bindDifferentHooks(this.grid, this.gridOptions, this.dataView); // emit the Grid & DataView object to make them available in parent component this.onGridCreated.emit(this.grid); // initialize the SlickGrid grid this.grid.init(); if (!this.customDataView && (this.dataView && this.dataView.beginUpdate && this.dataView.setItems && this.dataView.endUpdate)) { this.onDataviewCreated.emit(this.dataView); this.dataView.beginUpdate(); this.dataView.setItems(this._dataset, this.gridOptions.datasetIdPropertyName); this.dataView.endUpdate(); // if you don't want the items that are not visible (due to being filtered out or being on a different page) // to stay selected, pass 'false' to the second arg if (this.gridOptions && this.gridOptions.dataView && this.gridOptions.dataView.hasOwnProperty('syncGridSelection')) { const syncGridSelection = this.gridOptions.dataView.syncGridSelection; if (typeof syncGridSelection === 'boolean') { this.dataView.syncGridSelection(this.grid, this.gridOptions.dataView.syncGridSelection); } else { this.dataView.syncGridSelection(this.grid, syncGridSelection.preserveHidden, syncGridSelection.preserveHiddenOnSelectionChange); } } } // user might want to hide the header row on page load but still have `enableFiltering: true` // if that is the case, we need to hide the headerRow ONLY AFTER all filters got created & dataView exist if (this._hideHeaderRowAfterPageLoad) { this.showHeaderRow(false); } // after the DataView is created & updated execute some processes this.executeAfterDataviewCreated(this.grid, this.gridOptions, this.dataView); // bind resize ONLY after the dataView is ready this.bindResizeHook(this.grid, this.gridOptions); // bind & initialize grouping and header grouping colspan service if (this.gridOptions.createPreHeaderPanel && !this.gridOptions.enableDraggableGrouping) { this.groupingAndColspanService.init(this.grid, this.dataView); } // bind & initialize the grid service this.gridService.init(this.grid, this.dataView); // when user enables translation, we need to translate Headers on first pass & subsequently in the bindDifferentHooks if (this.gridOptions.enableTranslate) { this.extensionService.translateColumnHeaders(); } // if Export is enabled, initialize the service with the necessary grid and other objects if (this.gridOptions.enableExport) { this.exportService.init(this.grid, this.dataView); } // if Excel Export is enabled, initialize the service with the necessary grid and other objects if (this.gridOptions.enableExcelExport && this.sharedService) { // create an instance of the ExcelExportService only when required (opt-in) this.excelExportService = new ExcelExportService(this.translate); this.onGridBeforeExportToExcel = this.excelExportService.onGridBeforeExportToExcel; this.onGridAfterExportToExcel = this.excelExportService.onGridAfterExportToExcel; this.excelExportService.init(this.grid, this.dataView); } // once all hooks are in placed and the grid is initialized, we can emit an event this.onGridInitialized.emit(this.grid); // bind the Backend Service API callback functions only after the grid is initialized // because the preProcess() and onInit() might get triggered if (this.gridOptions && this.gridOptions.backendServiceApi) { this.bindBackendCallbackFunctions(this.gridOptions); } this.gridStateService.init(this.grid); this.onAngularGridCreated.emit({ // Slick Grid & DataView objects dataView: this.dataView, slickGrid: this.grid, // public methods destroy: this.destroy.bind(this), // return all available Services (non-singleton) backendService: this.gridOptions && this.gridOptions.backendServiceApi && this.gridOptions.backendServiceApi.service, excelExportService: this.excelExportService, exportService: this.exportService, extensionService: this.extensionService, filterService: this.filterService, gridEventService: this.gridEventService, gridStateService: this.gridStateService, gridService: this.gridService, groupingService: this.groupingAndColspanService, paginationService: this.paginationService, resizerService: this.resizer, sortService: this.sortService, /** @deprecated please use "extensionService" instead */ pluginService: this.extensionService, }); }
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
MethodDeclaration
/** * Commits the current edit to the grid */ commitEdit(target: Element) { if (this.grid.getOptions().autoCommitEdit) { const activeNode = this.grid.getActiveCellNode(); // a timeout must be set or this could come into conflict when slickgrid // tries to commit the edit when going from one editor to another on the grid // through the click event. If the timeout was not here it would // try to commit/destroy the editor twice, which would throw a jquery // error about the element not being in the DOM setTimeout(() => { // make sure the target is the active editor so we do not // commit prematurely if (activeNode && activeNode.contains(target) && this.grid.getEditorLock().isActive()) { this.grid.getEditorLock().commitCurrentEdit(); } }); } }
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
MethodDeclaration
/** * Define our internal Post Process callback, it will execute internally after we get back result from the Process backend call * For now, this is GraphQL Service ONLY feature and it will basically refresh the Dataset & Pagination without having the user to create his own PostProcess every time */ createBackendApiInternalPostProcessCallback(gridOptions: GridOption) { const backendApi = gridOptions && gridOptions.backendServiceApi; if (backendApi) { // internalPostProcess only works (for now) with a GraphQL Service, so make sure it is that type if (backendApi && backendApi.service instanceof GraphqlService) { backendApi.internalPostProcess = (processResult: GraphqlResult) => { const datasetName = (backendApi && backendApi.service && typeof backendApi.service.getDatasetName === 'function') ? backendApi.service.getDatasetName() : ''; if (processResult && processResult.data && processResult.data[datasetName]) { this._dataset = processResult.data[datasetName].nodes; if (processResult.data[datasetName].listSeparator) { // if the "listSeparator" is available in the GraphQL result, we'll override the ExportOptions Delimiter with this new info if (!this.gridOptions.exportOptions) { this.gridOptions.exportOptions = {}; } this.gridOptions.exportOptions.delimiterOverride = processResult.data[datasetName].listSeparator.toString(); } this.refreshGridData(this._dataset, processResult.data[datasetName].totalCount); } else { this._dataset = []; } }; } } }
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
MethodDeclaration
bindDifferentHooks(grid: any, gridOptions: GridOption, dataView: any) { // on locale change, we have to manually translate the Headers, GridMenu if (this.translate && this.translate.onLangChange) { this.subscriptions.push( this.translate.onLangChange.subscribe((event) => { if (gridOptions.enableTranslate) { this.extensionService.translateColumnHeaders(); this.extensionService.translateColumnPicker(); this.extensionService.translateGridMenu(); this.extensionService.translateHeaderMenu(); } }) ); } // if user entered some Columns "presets", we need to reflect them all in the grid if (gridOptions.presets && Array.isArray(gridOptions.presets.columns) && gridOptions.presets.columns.length > 0) { const gridColumns: Column[] = this.gridStateService.getAssociatedGridColumns(grid, gridOptions.presets.columns); if (gridColumns && Array.isArray(gridColumns) && gridColumns.length > 0) { // make sure that the checkbox selector is also visible if it is enabled if (gridOptions.enableCheckboxSelector) { const checkboxColumn = (Array.isArray(this._columnDefinitions) && this._columnDefinitions.length > 0) ? this._columnDefinitions[0] : null; if (checkboxColumn && checkboxColumn.id === '_checkbox_selector' && gridColumns[0].id !== '_checkbox_selector') { gridColumns.unshift(checkboxColumn); } } // finally set the new presets columns (including checkbox selector if need be) grid.setColumns(gridColumns); } } // bind external sorting (backend) when available or default onSort (dataView) if (gridOptions.enableSorting && !this.customDataView) { gridOptions.backendServiceApi ? this.sortService.bindBackendOnSort(grid, dataView) : this.sortService.bindLocalOnSort(grid, dataView); } // bind external filter (backend) when available or default onFilter (dataView) if (gridOptions.enableFiltering && !this.customDataView) { this.filterService.init(grid); // if user entered some Filter "presets", we need to reflect them all in the DOM if (gridOptions.presets && Array.isArray(gridOptions.presets.filters) && gridOptions.presets.filters.length > 0) { this.filterService.populateColumnFilterSearchTermPresets(gridOptions.presets.filters); } gridOptions.backendServiceApi ? this.filterService.bindBackendOnFilter(grid, this.dataView) : this.filterService.bindLocalOnFilter(grid, this.dataView); } // if user set an onInit Backend, we'll run it right away (and if so, we also need to run preProcess, internalPostProcess & postProcess) if (gridOptions.backendServiceApi) { const backendApi = gridOptions.backendServiceApi; if (backendApi && backendApi.service && backendApi.service.init) { backendApi.service.init(backendApi.options, gridOptions.pagination, this.grid); } } // expose all Slick Grid Events through dispatch for (const prop in grid) { if (grid.hasOwnProperty(prop) && prop.startsWith('on')) { this._eventHandler.subscribe(grid[prop], (e: any, args: any) => { return this.dispatchCustomEvent(`${slickgridEventPrefix}${titleCase(prop)}`, { eventData: e, args }); }); } } // expose all Slick DataView Events through dispatch for (const prop in dataView) { if (dataView.hasOwnProperty(prop) && prop.startsWith('on')) { this._eventHandler.subscribe(dataView[prop], (e: any, args: any) => { return this.dispatchCustomEvent(`${slickgridEventPrefix}${titleCase(prop)}`, { eventData: e, args }); }); } } // expose GridState Service changes event through dispatch this.subscriptions.push( this.gridStateService.onGridStateChanged.subscribe((gridStateChange: GridStateChange) => { this.onGridStateChanged.emit(gridStateChange); }) ); // on cell click, mainly used with the columnDef.action callback this.gridEventService.bindOnCellChange(grid, dataView); this.gridEventService.bindOnClick(grid, dataView); if (dataView && grid) { this._eventHandler.subscribe(dataView.onRowCountChanged, (e: any, args: any) => { grid.invalidate(); }); // without this, filtering data with local dataset will not always show correctly // also don't use "invalidateRows" since it destroys the entire row and as bad user experience when updating a row // see commit: https://github.com/ghiscoding/Angular-Slickgrid/commit/bb62c0aa2314a5d61188ff005ccb564577f08805 if (gridOptions && gridOptions.enableFiltering && !gridOptions.enableRowDetailView) { this._eventHandler.subscribe(dataView.onRowsChanged, (e: any, args: any) => { if (args && args.rows && Array.isArray(args.rows)) { args.rows.forEach((row) => grid.updateRow(row)); grid.render(); } }); } } // does the user have a colspan callback? if (gridOptions.colspanCallback) { this.dataView.getItemMetadata = (rowNumber: number) => { const item = this.dataView.getItem(rowNumber); return gridOptions.colspanCallback(item); }; } }
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
MethodDeclaration
bindBackendCallbackFunctions(gridOptions: GridOption) { const backendApi = gridOptions.backendServiceApi; const serviceOptions: BackendServiceOption = (backendApi && backendApi.service && backendApi.service.options) ? backendApi.service.options : {}; const isExecuteCommandOnInit = (!serviceOptions) ? false : ((serviceOptions && serviceOptions.hasOwnProperty('executeProcessCommandOnInit')) ? serviceOptions['executeProcessCommandOnInit'] : true); // update backend filters (if need be) before the query runs if (backendApi) { const backendService = backendApi.service; // if user entered some any "presets", we need to reflect them all in the grid if (gridOptions && gridOptions.presets) { // Filters "presets" if (backendService && backendService.updateFilters && Array.isArray(gridOptions.presets.filters) && gridOptions.presets.filters.length > 0) { backendService.updateFilters(gridOptions.presets.filters, true); } // Sorters "presets" if (backendService && backendService.updateSorters && Array.isArray(gridOptions.presets.sorters) && gridOptions.presets.sorters.length > 0) { backendService.updateSorters(undefined, gridOptions.presets.sorters); } // Pagination "presets" if (backendService && backendService.updatePagination && gridOptions.presets.pagination) { backendService.updatePagination(gridOptions.presets.pagination.pageNumber, gridOptions.presets.pagination.pageSize); } } else { const columnFilters = this.filterService.getColumnFilters(); if (columnFilters && backendService && backendService.updateFilters) { backendService.updateFilters(columnFilters, false); } } } if (backendApi && backendApi.service && (backendApi.onInit || isExecuteCommandOnInit)) { const query = (typeof backendApi.service.buildQuery === 'function') ? backendApi.service.buildQuery() : ''; const process = (isExecuteCommandOnInit) ? backendApi.process(query) : backendApi.onInit(query); // wrap this inside a setTimeout to avoid timing issue since the gridOptions needs to be ready before running this onInit setTimeout(() => { // keep start time & end timestamps & return it after process execution const startTime = new Date(); // run any pre-process, if defined, for example a spinner if (backendApi.preProcess) { backendApi.preProcess(); } try { // the processes can be Observables (like HttpClient) or Promises if (process instanceof Promise && process.then) { process.then((processResult: GraphqlResult | any) => executeBackendProcessesCallback(startTime, processResult, backendApi, this.gridOptions.pagination.totalItems)); } else if (isObservable(process)) { process.subscribe( (processResult: GraphqlResult | any) => executeBackendProcessesCallback(startTime, processResult, backendApi, this.gridOptions.pagination.totalItems), (error: any) => onBackendError(error, backendApi) ); } } catch (error) { onBackendError(error, backendApi); } }); } }
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
MethodDeclaration
bindResizeHook(grid: any, options: GridOption) { // expand/autofit columns on first page load if (grid && options.autoFitColumnsOnFirstLoad && options.enableAutoSizeColumns) { grid.autosizeColumns(); // compensate anytime SlickGrid measureScrollbar is incorrect (only seems to happen in Chrome 1/5 computers) this.resizer.compensateHorizontalScroll(this.grid, this.gridOptions); } // auto-resize grid on browser resize if (this._fixedHeight || this._fixedWidth) { this.resizer.init(grid, { height: this._fixedHeight, width: this._fixedWidth }); } else { this.resizer.init(grid); } if (options.enableAutoResize) { this.resizer.bindAutoResizeDataGrid(); if (grid && options.autoFitColumnsOnFirstLoad && options.enableAutoSizeColumns) { grid.autosizeColumns(); } } }
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
MethodDeclaration
executeAfterDataviewCreated(grid: any, gridOptions: GridOption, dataView: any) { // if user entered some Sort "presets", we need to reflect them all in the DOM if (gridOptions.enableSorting) { if (gridOptions.presets && Array.isArray(gridOptions.presets.sorters) && gridOptions.presets.sorters.length > 0) { this.sortService.loadLocalGridPresets(grid, dataView); } } }
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
MethodDeclaration
mergeGridOptions(gridOptions): GridOption { gridOptions.gridId = this.gridId; gridOptions.gridContainerId = `slickGridContainer-${this.gridId}`; // use jquery extend to deep merge & copy to avoid immutable properties being changed in GlobalGridOptions after a route change const options = $.extend(true, {}, GlobalGridOptions, this.forRootConfig, gridOptions); // using jQuery extend to do a deep clone has an unwanted side on objects and pageSizes but ES6 spread has other worst side effects // so we will just overwrite the pageSizes when needed, this is the only one causing issues so far. // jQuery wrote this on their docs:: On a deep extend, Object and Array are extended, but object wrappers on primitive types such as String, Boolean, and Number are not. if (gridOptions && gridOptions.backendServiceApi) { if (gridOptions.pagination && Array.isArray(gridOptions.pagination.pageSizes) && gridOptions.pagination.pageSizes.length > 0) { options.pagination.pageSizes = gridOptions.pagination.pageSizes; } } // also make sure to show the header row if user have enabled filtering this._hideHeaderRowAfterPageLoad = (options.showHeaderRow === false); if (options.enableFiltering && !options.showHeaderRow) { options.showHeaderRow = options.enableFiltering; } return options; }
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
MethodDeclaration
/** * On a Pagination changed, we will trigger a Grid State changed with the new pagination info * Also if we use Row Selection or the Checkbox Selector, we need to reset any selection */ paginationChanged(pagination: Pagination) { if (this.gridOptions.enableRowSelection || this.gridOptions.enableCheckboxSelector) { this.gridService.setSelectedRows([]); } this.gridStateService.onGridStateChanged.next({ change: { newValues: pagination, type: GridStateType.pagination }, gridState: this.gridStateService.getCurrentGridState() }); }
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
MethodDeclaration
/** * When dataset changes, we need to refresh the entire grid UI & possibly resize it as well * @param dataset */ refreshGridData(dataset: any[], totalCount?: number) { if (Array.isArray(dataset) && this.grid && this.dataView && typeof this.dataView.setItems === 'function') { this.dataView.setItems(dataset, this.gridOptions.datasetIdPropertyName); if (!this.gridOptions.backendServiceApi) { this.dataView.reSort(); } if (dataset) { this.grid.invalidate(); this.grid.render(); } if (this.gridOptions && this.gridOptions.backendServiceApi && this.gridOptions.pagination) { // do we want to show pagination? // if we have a backendServiceApi and the enablePagination is undefined, we'll assume that we do want to see it, else get that defined value this.showPagination = ((this.gridOptions.backendServiceApi && this.gridOptions.enablePagination === undefined) ? true : this.gridOptions.enablePagination) || false; if (this.gridOptions.presets && this.gridOptions.presets.pagination && this.gridOptions.pagination) { this.paginationOptions.pageSize = this.gridOptions.presets.pagination.pageSize; this.paginationOptions.pageNumber = this.gridOptions.presets.pagination.pageNumber; } // when we have a totalCount use it, else we'll take it from the pagination object // only update the total items if it's different to avoid refreshing the UI const totalRecords = totalCount !== undefined ? totalCount : this.gridOptions.pagination.totalItems; if (totalRecords !== this.totalItems) { this.totalItems = totalRecords; } } else { // without backend service, we'll assume the total of items is the dataset size this.totalItems = dataset.length; } // resize the grid inside a slight timeout, in case other DOM element changed prior to the resize (like a filter/pagination changed) if (this.grid && this.gridOptions.enableAutoResize) { const delay = this.gridOptions.autoResize && this.gridOptions.autoResize.delay; this.resizer.resizeGrid(delay || 10); } } }
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
MethodDeclaration
/** * Dynamically change or update the column definitions list. * We will re-render the grid so that the new header and data shows up correctly. * If using i18n, we also need to trigger a re-translate of the column headers */ updateColumnDefinitionsList(newColumnDefinitions) { // map/swap the internal library Editor to the SlickGrid Editor factory newColumnDefinitions = this.swapInternalEditorToSlickGridFactoryEditor(newColumnDefinitions); if (this.gridOptions.enableTranslate) { this.extensionService.translateColumnHeaders(false, newColumnDefinitions); } else { this.extensionService.renderColumnHeaders(newColumnDefinitions); } if (this.gridOptions && this.gridOptions.enableAutoSizeColumns) { this.grid.autosizeColumns(); } }
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
MethodDeclaration
/** Toggle the filter row displayed on first row * @param isShowing */ showHeaderRow(isShowing: boolean) { this.grid.setHeaderRowVisibility(isShowing); return isShowing; }
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
MethodDeclaration
/** Toggle the filter row displayed on first row */ toggleHeaderRow() { const isShowing = !this.grid.getOptions().showHeaderRow; this.grid.setHeaderRowVisibility(isShowing); return isShowing; }
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
MethodDeclaration
// // private functions // ------------------ /** Dispatch of Custom Event, which by default will bubble & is cancelable */ private dispatchCustomEvent(eventName: string, data?: any, isBubbling: boolean = true, isCancelable: boolean = true) { const eventInit: CustomEventInit = { bubbles: isBubbling, cancelable: isCancelable }; if (data) { eventInit.detail = data; } return this.elm.nativeElement.dispatchEvent(new CustomEvent(eventName, eventInit)); }
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
MethodDeclaration
/** Load the Editor Collection asynchronously and replace the "collection" property when Observable resolves */ private loadEditorCollectionAsync(column: Column) { const collectionAsync = column && column.editor && column.editor.collectionAsync; if (collectionAsync instanceof Observable) { this.subscriptions.push( collectionAsync.subscribe((resolvedCollection) => this.updateEditorCollection(column, resolvedCollection)) ); } }
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
MethodDeclaration
/** * For convenience to the user, we provide the property "editor" as an Angular-Slickgrid editor complex object * however "editor" is used internally by SlickGrid for it's own Editor Factory * so in our lib we will swap "editor" and copy it into a new property called "internalColumnEditor" * then take back "editor.model" and make it the new "editor" so that SlickGrid Editor Factory still works */ private swapInternalEditorToSlickGridFactoryEditor(columnDefinitions: Column[]) { return columnDefinitions.map((column: Column | any) => { // on every Editor that have a "collectionAsync", resolve the data and assign it to the "collection" property if (column.editor && column.editor.collectionAsync) { this.loadEditorCollectionAsync(column); } return { ...column, editor: column.editor && column.editor.model, internalColumnEditor: { ...column.editor } }; }); }
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
MethodDeclaration
/** * Update the Editor "collection" property from an async call resolved * Since this is called after the async call resolves, the pointer will not be the same as the "column" argument passed. * Once we found the new pointer, we will reassign the "editor" and "collection" to the "internalColumnEditor" so it has newest collection */ private updateEditorCollection(column: Column, newCollection: any[]) { column.editor.collection = newCollection; // find the new column reference pointer const columns = this.grid.getColumns(); if (Array.isArray(columns)) { const columnRef: Column = columns.find((col: Column) => col.id === column.id); columnRef.internalColumnEditor = column.editor; } }
ljacques/Angular-Slickgrid
src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts
TypeScript
ArrowFunction
(props: ISvgIconProps) => ( <svg width={props.size}
StringKe/IconPark
packages/react/src/icons/IconinnerShadowBottomLeft.tsx
TypeScript
InterfaceDeclaration
export interface FlagMap { readonly [key: string]: { readonly char?: AlphabetLowercase; readonly description: string; }; }
Gustu/lisk-sdk
commander/src/utils/flags.ts
TypeScript
TypeAliasDeclaration
export type AlphabetLowercase = | 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' | 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z';
Gustu/lisk-sdk
commander/src/utils/flags.ts
TypeScript
ClassDeclaration
@Component({ selector: 'list-item', templateUrl: './list.item.component.html', styleUrls: ['./list.item.component.css'] }) export class ListItemComponent implements OnInit { @Input('title') title: String; @Input('id') id: String; @Output('delete') deleteEvent = new EventEmitter(); @Output('item-selected') itemSelectedEvent = new EventEmitter(); constructor() { } ngOnInit() { } onTitleSelected() { } onDelete() { // raise an event for handling delete this.deleteEvent.emit({ id: this.id }); } onItemSelected() { // raise an event for handling item selection this.itemSelectedEvent.emit({ id: this.id }); } }
att-cloudnative-labs/greensight
src/app/modules/cpt/components/list-item/list.item.component.ts
TypeScript
MethodDeclaration
ngOnInit() { }
att-cloudnative-labs/greensight
src/app/modules/cpt/components/list-item/list.item.component.ts
TypeScript
MethodDeclaration
onTitleSelected() { }
att-cloudnative-labs/greensight
src/app/modules/cpt/components/list-item/list.item.component.ts
TypeScript
MethodDeclaration
onDelete() { // raise an event for handling delete this.deleteEvent.emit({ id: this.id }); }
att-cloudnative-labs/greensight
src/app/modules/cpt/components/list-item/list.item.component.ts
TypeScript
MethodDeclaration
onItemSelected() { // raise an event for handling item selection this.itemSelectedEvent.emit({ id: this.id }); }
att-cloudnative-labs/greensight
src/app/modules/cpt/components/list-item/list.item.component.ts
TypeScript
ArrowFunction
(response: Response) => response.json()
sivathangeswaran/profiles-polly
src/components/app-home/app-home.tsx
TypeScript
ArrowFunction
response => { console.log("followSelectedUser response captured"); console.log(response); var index = 0; this.usersData.forEach(user => { if(user==selecteduser){ this.usersData[index].isFollowing = true; } index++; }); }
sivathangeswaran/profiles-polly
src/components/app-home/app-home.tsx
TypeScript
ArrowFunction
user => { if(user==selecteduser){ this.usersData[index].isFollowing = true; } index++; }
sivathangeswaran/profiles-polly
src/components/app-home/app-home.tsx
TypeScript
ArrowFunction
response => { this.usersData = response.result; this.currentUser = response.user[0]; this.getFollowingStatus(); }
sivathangeswaran/profiles-polly
src/components/app-home/app-home.tsx
TypeScript
ArrowFunction
user => { if(user.picture){ this.usersData[index].imgUrl = "assets/icon/"+user.first_name.toLowerCase()+".jpg"; }else{ this.usersData[index].imgUrl = "assets/icon/avatar.jpeg"; } followings.forEach(following => { this.usersData[index].followText = "Follow"; if(user.emp_id==following.emp_id){ this.usersData[index].followText = "Following"; } }); index++; }
sivathangeswaran/profiles-polly
src/components/app-home/app-home.tsx
TypeScript
ArrowFunction
following => { this.usersData[index].followText = "Follow"; if(user.emp_id==following.emp_id){ this.usersData[index].followText = "Following"; } }
sivathangeswaran/profiles-polly
src/components/app-home/app-home.tsx
TypeScript
ArrowFunction
() => { location.href='/notifications' }
sivathangeswaran/profiles-polly
src/components/app-home/app-home.tsx
TypeScript
ArrowFunction
() => { location.href='/' }
sivathangeswaran/profiles-polly
src/components/app-home/app-home.tsx
TypeScript
ArrowFunction
(event) => { this.handleChange(event);}
sivathangeswaran/profiles-polly
src/components/app-home/app-home.tsx
TypeScript
ArrowFunction
user => <div> <ion-item> <ion-avatar
sivathangeswaran/profiles-polly
src/components/app-home/app-home.tsx
TypeScript
ArrowFunction
() => { this.followSelectedUser(user); }
sivathangeswaran/profiles-polly
src/components/app-home/app-home.tsx
TypeScript
ArrowFunction
() => { location.href='/notes/'+user.emp_id.$numberInt }
sivathangeswaran/profiles-polly
src/components/app-home/app-home.tsx
TypeScript
ClassDeclaration
@Component({ tag: 'app-home', styleUrl: 'app-home.css' }) export class AppHome { @State() value: string; @State() showData: boolean; @State() usersData : any; @State() user_id = 10046; @State() currentUser :any; @State() searchQuery :string; @Prop() searchText:string; handleChange(event) { this.searchQuery = event.target.value; this.getUsersData(this.searchQuery); } showSelectedUserCard(selecteduser) { console.log("showSelectedUserCard called"); this.getUsersData(selecteduser.first_name); } prepareNotes() { console.log("prepareNotes called"); } followSelectedUser(selecteduser) { console.log('https://webhooks.mongodb-stitch.com/api/client/v2.0/app/nasdaq-polly-lqprf/service/profiles-service/incoming_webhook/follow?action=follow&user='+this.user_id+'&follow='+selecteduser.emp_id.$numberInt); console.log("followSelectedUser called"); fetch('https://webhooks.mongodb-stitch.com/api/client/v2.0/app/nasdaq-polly-lqprf/service/profiles-service/incoming_webhook/follow?action=follow&user='+this.user_id+'&follow='+selecteduser.emp_id.$numberInt) .then((response: Response) => response.json()) .then(response => { console.log("followSelectedUser response captured"); console.log(response); var index = 0; this.usersData.forEach(user => { if(user==selecteduser){ this.usersData[index].isFollowing = true; } index++; }); }); } getUsersData(searchText) { console.log("printing serachtext before api call"); fetch('https://webhooks.mongodb-stitch.com/api/client/v2.0/app/nasdaq-polly-lqprf/service/profiles-service/incoming_webhook/get-profiles?user=10046&arg='+searchText) .then((response: Response) => response.json()) .then(response => { this.usersData = response.result; this.currentUser = response.user[0]; this.getFollowingStatus(); }); } getFollowingStatus() { console.log("getFollowingStatus called"); var index = 0; var followings = this.currentUser.followers; console.log("current user in getFollowingStatus"+ this.currentUser); this.usersData.forEach(user => { if(user.picture){ this.usersData[index].imgUrl = "assets/icon/"+user.first_name.toLowerCase()+".jpg"; }else{ this.usersData[index].imgUrl = "assets/icon/avatar.jpeg"; } followings.forEach(following => { this.usersData[index].followText = "Follow"; if(user.emp_id==following.emp_id){ this.usersData[index].followText = "Following"; } }); index++; }); this.showData = true; } componentWillLoad() { if(!this.searchText){ this.searchText= ""; } this.searchQuery = this.searchText; console.log("printing serachtext before api call componentWillLoad"+this.searchText); this.getUsersData(this.searchQuery); } render() { if(this.showData){ return ( <div class="full-height"> <ion-item> <ion-label></ion-label> </ion-item> <ion-toolbar color="primary"> <ion-buttons slot="primary"> <ion-button on-click={() => { location.href='/notifications' }}> <ion-icon slot="icon-only" name="notifications" size="small" /> </ion-button> <ion-button> <ion-icon slot="icon-only" name="star" size="small" /> </ion-button> <ion-button> <ion-icon slot="icon-only" name="settings" size="small" /> </ion-button> </ion-buttons> <ion-title>Nasdaq Polly</ion-title> <ion-button on-click={() => { location.href='/' }}> <ion-icon slot="icon-only" name="home" size="small" /> </ion-button> </ion-toolbar> <ion-searchbar on-change={(event) => { this.handleChange(event);}} on-input={(event) => { this.handleChange(event);}} value={this.searchQuery}></ion-searchbar> <ion-list> {this.usersData.map(user => <div> <ion-item> <ion-avatar slot="start"> <img src={user.imgUrl} /> </ion-avatar> <ion-label on-click={() => { this.showSelectedUserCard(user); }}>{user.first_name} {user.last_name}</ion-label> </ion-item> <ion-card hidden={!(user==this.usersData[0])}> <ion-card-header> <ion-card-subtitle>{user.first_name} {user.last_name}</ion-card-subtitle> <ion-card-title>{user.designation}</ion-card-title> </ion-card-header> <ion-card-content> Keep close to Nature's heart... and break clear away, once in awhile, and climb a mountain or spend a week in the woods. Wash your spirit clean. </ion-card-content> <ion-item> <ion-icon name="pin" slot="start" /> <ion-label>Checkedin at {user.city}</ion-label> </ion-item> <ion-item> <ion-icon name="alarm" slot="start" /> <ion-label>{user.last_checkin}</ion-label> </ion-item> <ion-item> <ion-button color="secondary" size="small" on-click={() => { this.followSelectedUser(user); }}>{user.followText}</ion-button> <ion-button color="secondary" size="small" on-click={() => { location.href='/notes/'+user.emp_id.$numberInt }}>Notes</ion-button> </ion-item> </ion-card> </div> )}
sivathangeswaran/profiles-polly
src/components/app-home/app-home.tsx
TypeScript
MethodDeclaration
handleChange(event) { this.searchQuery = event.target.value; this.getUsersData(this.searchQuery); }
sivathangeswaran/profiles-polly
src/components/app-home/app-home.tsx
TypeScript
MethodDeclaration
showSelectedUserCard(selecteduser) { console.log("showSelectedUserCard called"); this.getUsersData(selecteduser.first_name); }
sivathangeswaran/profiles-polly
src/components/app-home/app-home.tsx
TypeScript
MethodDeclaration
prepareNotes() { console.log("prepareNotes called"); }
sivathangeswaran/profiles-polly
src/components/app-home/app-home.tsx
TypeScript
MethodDeclaration
followSelectedUser(selecteduser) { console.log('https://webhooks.mongodb-stitch.com/api/client/v2.0/app/nasdaq-polly-lqprf/service/profiles-service/incoming_webhook/follow?action=follow&user='+this.user_id+'&follow='+selecteduser.emp_id.$numberInt); console.log("followSelectedUser called"); fetch('https://webhooks.mongodb-stitch.com/api/client/v2.0/app/nasdaq-polly-lqprf/service/profiles-service/incoming_webhook/follow?action=follow&user='+this.user_id+'&follow='+selecteduser.emp_id.$numberInt) .then((response: Response) => response.json()) .then(response => { console.log("followSelectedUser response captured"); console.log(response); var index = 0; this.usersData.forEach(user => { if(user==selecteduser){ this.usersData[index].isFollowing = true; } index++; }); }); }
sivathangeswaran/profiles-polly
src/components/app-home/app-home.tsx
TypeScript
MethodDeclaration
getUsersData(searchText) { console.log("printing serachtext before api call"); fetch('https://webhooks.mongodb-stitch.com/api/client/v2.0/app/nasdaq-polly-lqprf/service/profiles-service/incoming_webhook/get-profiles?user=10046&arg='+searchText) .then((response: Response) => response.json()) .then(response => { this.usersData = response.result; this.currentUser = response.user[0]; this.getFollowingStatus(); }); }
sivathangeswaran/profiles-polly
src/components/app-home/app-home.tsx
TypeScript
MethodDeclaration
getFollowingStatus() { console.log("getFollowingStatus called"); var index = 0; var followings = this.currentUser.followers; console.log("current user in getFollowingStatus"+ this.currentUser); this.usersData.forEach(user => { if(user.picture){ this.usersData[index].imgUrl = "assets/icon/"+user.first_name.toLowerCase()+".jpg"; }else{ this.usersData[index].imgUrl = "assets/icon/avatar.jpeg"; } followings.forEach(following => { this.usersData[index].followText = "Follow"; if(user.emp_id==following.emp_id){ this.usersData[index].followText = "Following"; } }); index++; }); this.showData = true; }
sivathangeswaran/profiles-polly
src/components/app-home/app-home.tsx
TypeScript
MethodDeclaration
componentWillLoad() { if(!this.searchText){ this.searchText= ""; } this.searchQuery = this.searchText; console.log("printing serachtext before api call componentWillLoad"+this.searchText); this.getUsersData(this.searchQuery); }
sivathangeswaran/profiles-polly
src/components/app-home/app-home.tsx
TypeScript
MethodDeclaration
render() { if(this.showData){ return ( <div class="full-height"> <ion-item> <ion-label></ion-label> </ion-item> <ion-toolbar color="primary"> <ion-buttons slot="primary"> <ion-button on-click={() => { location.href='/notifications' }}> <ion-icon slot="icon-only" name="notifications" size="small" /> </ion-button> <ion-button> <ion-icon slot="icon-only" name="star" size="small" /> </ion-button> <ion-button> <ion-icon slot="icon-only" name="settings" size="small" /> </ion-button> </ion-buttons> <ion-title>Nasdaq Polly</ion-title> <ion-button on-click={() => { location.href='/' }}> <ion-icon slot="icon-only" name="home" size="small" /> </ion-button> </ion-toolbar> <ion-searchbar on-change={(event) => { this.handleChange(event);}} on-input={(event) => { this.handleChange(event);}} value={this.searchQuery}></ion-searchbar> <ion-list> {this.usersData.map(user => <div> <ion-item> <ion-avatar slot="start"> <img src={user.imgUrl} /> </ion-avatar> <ion-label on-click={() => { this.showSelectedUserCard(user); }}>{user.first_name} {user.last_name}</ion-label> </ion-item> <ion-card hidden={!(user==this.usersData[0])}> <ion-card-header> <ion-card-subtitle>{user.first_name} {user.last_name}</ion-card-subtitle> <ion-card-title>{user.designation}</ion-card-title> </ion-card-header> <ion-card-content> Keep close to Nature's heart... and break clear away, once in awhile, and climb a mountain or spend a week in the woods. Wash your spirit clean. </ion-card-content> <ion-item> <ion-icon name="pin" slot="start" /> <ion-label>Checkedin at {user.city}</ion-label> </ion-item> <ion-item> <ion-icon name="alarm" slot="start" /> <ion-label>{user.last_checkin}</ion-label> </ion-item> <ion-item> <ion-button color="secondary" size="small" on-click={() => { this.followSelectedUser(user); }}>{user.followText}</ion-button> <ion-button color="secondary" size="small" on-click={() => { location.href='/notes/'+user.emp_id.$numberInt }}>Notes</ion-button> </ion-item> </ion-card> </div> )}
sivathangeswaran/profiles-polly
src/components/app-home/app-home.tsx
TypeScript
FunctionDeclaration
export function f1() { return new mExported.me.class1(); }
mybios/tstolua
tests/cases/projects/privacyCheck-SimpleReference/test.ts
TypeScript
FunctionDeclaration
function f2() { return new mExported.me.class1(); }
mybios/tstolua
tests/cases/projects/privacyCheck-SimpleReference/test.ts
TypeScript
FunctionDeclaration
export function f3() { return new mNonExported.mne.class1(); }
mybios/tstolua
tests/cases/projects/privacyCheck-SimpleReference/test.ts
TypeScript
FunctionDeclaration
function f4() { return new mNonExported.mne.class1(); }
mybios/tstolua
tests/cases/projects/privacyCheck-SimpleReference/test.ts
TypeScript
ClassDeclaration
export class class1 extends mExported.me.class1 { }
mybios/tstolua
tests/cases/projects/privacyCheck-SimpleReference/test.ts
TypeScript
ClassDeclaration
class class2 extends mExported.me.class1 { }
mybios/tstolua
tests/cases/projects/privacyCheck-SimpleReference/test.ts
TypeScript
ClassDeclaration
export class class3 extends mNonExported.mne.class1 { }
mybios/tstolua
tests/cases/projects/privacyCheck-SimpleReference/test.ts
TypeScript
ClassDeclaration
class class4 extends mNonExported.mne.class1 { }
mybios/tstolua
tests/cases/projects/privacyCheck-SimpleReference/test.ts
TypeScript
ClassDeclaration
@Module({ controllers: [ApiController, AppController], providers: [AppService, BaseService, ServiceA, ServiceB], imports: [UsersModule], }) export class AppModule { }
dextto/book-nestjs-backend
examples/ch4-provider/src/app.module.ts
TypeScript
FunctionDeclaration
function useFullScreenEditorTogglingEffect(fullscreen: boolean) { const globals = useGlobals(); useLayoutEffect(() => { if (!fullscreen) { iframeFullscreenContainer(globals.id, dependencies__.all.body()).classList.add("hidden"); } else { iframeFullscreenContainer(globals.id, dependencies__.all.body()).classList.remove("hidden"); } }, [fullscreen]); }
jschuler/kogito-tooling
packages/chrome-extension/src/app/components/single/SingleEditorApp.tsx
TypeScript
FunctionDeclaration
export function SingleEditorApp(props: { openFileExtension: string; readonly: boolean; getFileName: () => string; getFileContents: () => Promise<string | undefined>; toolbarContainer: HTMLElement; iframeContainer: HTMLElement; githubTextEditorToReplace: HTMLElement; fileInfo: FileInfo; }) { const [textMode, setTextMode] = useState(false); const [textModeEnabled, setTextModeEnabled] = useState(false); const [fullscreen, setFullscreen] = useState(false); const globals = useGlobals(); const isolatedEditorRef = useRef<IsolatedEditorRef>(null); useFullScreenEditorTogglingEffect(fullscreen); useIsolatedEditorTogglingEffect(textMode, props.iframeContainer, props.githubTextEditorToReplace); const IsolatedEditorComponent = ( <IsolatedEditor getFileContents={props.getFileContents} contentPath={props.fileInfo.path} openFileExtension={props.openFileExtension} textMode={textMode} readonly={props.readonly} keepRenderedEditorInTextMode={true} ref={isolatedEditorRef} /> ); const exitFullScreen = useCallback(() => { setFullscreen(false); setTextModeEnabled(false); }, []); const deactivateTextMode = useCallback(() => setTextMode(false), []); const activateTextMode = useCallback(() => setTextMode(true), []); const goFullScreen = useCallback(() => setFullscreen(true), []); const openExternalEditor = () => { props.getFileContents().then(fileContent => { globals.externalEditorManager?.open(props.getFileName(), fileContent!, props.readonly); }); }; const linkToExternalEditor = useMemo(() => { return globals.externalEditorManager?.getLink( `${props.fileInfo.org}/${props.fileInfo.repo}/${props.fileInfo.gitRef}/${props.fileInfo.path}` ); }, [globals.externalEditorManager]); useEffect(() => { const listener = globals.externalEditorManager?.listenToComeBack(fileName => { dependencies__.all.edit__githubFileNameInput()!.value = fileName; }, isolatedEditorRef.current?.setContent!); return () => { listener?.stopListening(); }; }, [globals.externalEditorManager]); return ( <> <IsolatedEditorContext.Provider value={{ onEditorReady: () => setTextModeEnabled(true), fullscreen: fullscreen, textMode: textMode, repoInfo: { gitref: props.fileInfo.gitRef, owner: props.fileInfo.org, repo: props.fileInfo.repo } }}
jschuler/kogito-tooling
packages/chrome-extension/src/app/components/single/SingleEditorApp.tsx
TypeScript
ArrowFunction
() => { if (!fullscreen) { iframeFullscreenContainer(globals.id, dependencies__.all.body()).classList.add("hidden"); } else { iframeFullscreenContainer(globals.id, dependencies__.all.body()).classList.remove("hidden"); } }
jschuler/kogito-tooling
packages/chrome-extension/src/app/components/single/SingleEditorApp.tsx
TypeScript
ArrowFunction
() => { setFullscreen(false); setTextModeEnabled(false); }
jschuler/kogito-tooling
packages/chrome-extension/src/app/components/single/SingleEditorApp.tsx
TypeScript
ArrowFunction
() => setTextMode(false)
jschuler/kogito-tooling
packages/chrome-extension/src/app/components/single/SingleEditorApp.tsx
TypeScript
ArrowFunction
() => setTextMode(true)
jschuler/kogito-tooling
packages/chrome-extension/src/app/components/single/SingleEditorApp.tsx
TypeScript
ArrowFunction
() => setFullscreen(true)
jschuler/kogito-tooling
packages/chrome-extension/src/app/components/single/SingleEditorApp.tsx
TypeScript
ArrowFunction
() => { props.getFileContents().then(fileContent => { globals.externalEditorManager?.open(props.getFileName(), fileContent!, props.readonly); }); }
jschuler/kogito-tooling
packages/chrome-extension/src/app/components/single/SingleEditorApp.tsx
TypeScript
ArrowFunction
fileContent => { globals.externalEditorManager?.open(props.getFileName(), fileContent!, props.readonly); }
jschuler/kogito-tooling
packages/chrome-extension/src/app/components/single/SingleEditorApp.tsx
TypeScript
ArrowFunction
() => { return globals.externalEditorManager?.getLink( `${props.fileInfo.org}/${props.fileInfo.repo}/${props.fileInfo.gitRef}/${props.fileInfo.path}` ); }
jschuler/kogito-tooling
packages/chrome-extension/src/app/components/single/SingleEditorApp.tsx
TypeScript
ArrowFunction
() => { const listener = globals.externalEditorManager?.listenToComeBack(fileName => { dependencies__.all.edit__githubFileNameInput()!.value = fileName; }, isolatedEditorRef.current?.setContent!); return () => { listener?.stopListening(); }; }
jschuler/kogito-tooling
packages/chrome-extension/src/app/components/single/SingleEditorApp.tsx
TypeScript
ArrowFunction
fileName => { dependencies__.all.edit__githubFileNameInput()!.value = fileName; }
jschuler/kogito-tooling
packages/chrome-extension/src/app/components/single/SingleEditorApp.tsx
TypeScript
ArrowFunction
() => { listener?.stopListening(); }
jschuler/kogito-tooling
packages/chrome-extension/src/app/components/single/SingleEditorApp.tsx
TypeScript